[Bug 209130] The Dtrace PID provider not working with 32 bit daemons in a 64 bit environment.

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Apr 28 18:15:43 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209130

            Bug ID: 209130
           Summary: The Dtrace PID provider not working with 32 bit
                    daemons in a 64 bit environment.
           Product: Base System
           Version: 10.2-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: misc
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: abhya007 at gmail.com
                CC: freebsd-amd64 at FreeBSD.org
                CC: freebsd-amd64 at FreeBSD.org

Tested for a sample daemon on Stock FreeBSD 10.2 Release  with 32 bit and 64
bit executables. The daemon had an orphan child process running a while loop
with sleep(). Pasted below is the code for the sample daemon :

int main()                                                                      
{                                                                               
  pid_t process_id = 0;                                                         
// Create child process                                                         
  process_id = fork();                                                          
  if (process_id < 0)                                                           
       {                                                                        
          printf("fork failed!\n");                                             
          exit(1);                                                              
       }                                                                        
// killing the parent                                             
   if (process_id > 0)                                                          
      {                                                                         
          printf("The process id of the child is :%d" , process_id);            
          exit(0);                                                              
      }                                                                         
  while (1)                                                                     
      {                                                                         
       sleep(1);                                                                
      }                                                                         
}       

* The child process’s pid was then traced for using    dtrace –n
‘pid$target:::entry {} ‘ -p < pid of the child process >   

* The dtrace test on the 32 bit daemon reported a segmentation fault : signal
11 and resulted into a core. The backtrace of the core looked like :
Core was generated by `daemon'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x08054802 in .cerror () at
../../../../../src/bsd/lib/libc/i386/sys/cerror.S:62
#2  0x0804991f in __sleep (seconds=1) at
../../../../../src/bsd/lib/libc/gen/sleep.c:63
#3  0x08048232 in main () at
../../../../../src/junos/usr.sbin/dump_proc/daemon.c:27

* The dtrace test on the 64 bit daemon did not report any errors and was traced
correctly.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list