Thus spake Robert Latham:
> Does 'dmesg' have any information? perhaps about an application that
> made an unaligned access?  Otherwise, I'm not sure where to begin
> debugging this one...

I was poking around arch/sparc/kernel/unaligned.c, and I don't *think*
the kernel is going to warn you about it these days (at least, that's
the way it looks on the 2.6 kernel).  It does send a SIGBUS to the
process however, which would kill it.  Given that it's likely there are
unaligned accesses left here and there (due to large code changes more
than anything), and both sparc and alpha throw a SIGBUS in that case (on
alpha, they apparently changed it in the 2.6 kernel - it used to
silently fix things up for you, now it errors out),

Would it make sense for pvfs2-server to install a handler for SIGBUS
alongside the SIGSEGV handler, #ifdef __PVFS2_SEGV_BACKTRACE__?

Something like the attached small patch.  I'm not positive on the use of
new_action, but a SIGBUS sends the same siginfo_t as a SIGSEGV, so in
theory it might be useful to get at least some manner of trace to
pinpoint the problem areas.

-- 
Nathan Poznick <[EMAIL PROTECTED]>

When one has good health it is not serious to be ill. Francis Blanche

Index: src/server/pvfs2-server.c
===================================================================
RCS file: /anoncvs/pvfs2/src/server/pvfs2-server.c,v
retrieving revision 1.213
diff -u -r1.213 pvfs2-server.c
--- src/server/pvfs2-server.c   29 May 2006 16:21:11 -0000      1.213
+++ src/server/pvfs2-server.c   1 Jun 2006 05:53:32 -0000
@@ -1261,8 +1261,10 @@
     sigaction (SIGQUIT, &new_action, NULL);
 #ifdef __PVFS2_SEGV_BACKTRACE__
     sigaction (SIGSEGV, &segv_action, NULL);
+    sigaction (SIGBUS, &segv_action, NULL);
 #else
     sigaction (SIGSEGV, &new_action, NULL);
+    sigaction (SIGBUS, &new_action, NULL);
 #endif
 
     /* ignore these */
@@ -1298,7 +1300,7 @@
     ucontext_t *uc = (ucontext_t *)secret;
 
     /* Do something useful with siginfo_t */
-    if (sig == SIGSEGV)
+    if (sig == SIGSEGV || sig == SIGBUS)
     {
         gossip_err("PVFS2 server: signal %d, faulty address is %p, " 
             "from %p\n", sig, info->si_addr, 
@@ -1472,7 +1474,7 @@
 
     if (getpid() == server_controlling_pid)
     {
-        if (sig != SIGSEGV)
+        if (sig != SIGSEGV && sig != SIGBUS)
         {
             gossip_err("\nPVFS2 server got signal %d "
                        "(server_status_flag: %d)\n",

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Pvfs2-users mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users

Reply via email to