Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
433cc893
Commit
433cc893
authored
Jun 06, 2009
by
hrothgar
Browse files
add more output
parent
de96dbfe
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
433cc893
...
...
@@ -4195,10 +4195,36 @@ static void segvHandler (int sig, siginfo_t *info, void *secret) {
int i, trace_size = 0;
long offset=0;
ucontext_t *uc = (ucontext_t *)secret;
redisLog(REDIS_DEBUG, "Segmentation fault -%d- Redis %s", sig, REDIS_VERSION );
redisLog(REDIS_DEBUG,"EIP %p", (void *)uc->uc_mcontext.gregs[REG_EIP]);
redisLog(REDIS_DEBUG,"EAX %p, EBX %p, ECX %p, EDX %p", (void *)uc->uc_mcontext.gregs[REG_EAX], (void *)uc->uc_mcontext.gregs[REG_EBX], (void *)uc->uc_mcontext.gregs[REG_ECX], (void *)uc->uc_mcontext.gregs[REG_EDX]);
time_t uptime = time(NULL)-server.stat_starttime;
redisLog(REDIS_WARNING, "application: redis, signal: segmentation fault -%d-",REDIS_VERSION, sig);
redisLog(REDIS_WARNING, "%s", sdscatprintf(sdsempty(),
"redis_version:%s; "
"uptime_in_days:%d; "
"connected_clients:%d; "
"connected_slaves:%d; "
"used_memory:%zu; "
"changes_since_last_save:%lld; "
"bgsave_in_progress:%d; "
"last_save_time:%d; "
"total_connections_received:%lld; "
"total_commands_processed:%lld; "
"role:%s;"
,REDIS_VERSION,
uptime,
listLength(server.clients)-listLength(server.slaves),
listLength(server.slaves),
server.usedmemory,
server.dirty,
server.bgsaveinprogress,
server.lastsave,
server.stat_numconnections,
server.stat_numcommands,
server.masterhost == NULL ? "master" : "slave"
));
redisLog(REDIS_WARNING,"EIP %p", (void *)uc->uc_mcontext.gregs[REG_EIP]);
redisLog(REDIS_WARNING,"EAX %p, EBX %p, ECX %p, EDX %p", (void *)uc->uc_mcontext.gregs[REG_EAX], (void *)uc->uc_mcontext.gregs[REG_EBX], (void *)uc->uc_mcontext.gregs[REG_ECX], (void *)uc->uc_mcontext.gregs[REG_EDX]);
trace_size = backtrace(trace, 100);
...
...
@@ -4214,10 +4240,10 @@ static void segvHandler (int sig, siginfo_t *info, void *secret) {
tmp=strstr(messages[i],pointer[i]);
if((tmp-2)[0]!=')'){
char *a=findFuncName(trace[i], &offset);
redisLog(REDIS_
DEBUG,"[bt]
(%s+%x) %s", a, (unsigned int)offset, tmp);
redisLog(REDIS_
WARNING,"#%d
(%s+
0x
%x) %s",
i,
a, (unsigned int)offset, tmp);
}
else
redisLog(REDIS_
DEBUG,"[bt]
%s", messages[i]);
redisLog(REDIS_
WARNING,"#%d
%s",
i,
messages[i]);
}
free(messages);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment