I am running prog with GDB - throws SIG32, why?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tvnaidu
    Contributor
    • Oct 2009
    • 365

    I am running prog with GDB - throws SIG32, why?

    I am running prog with GDB - throws SIG32, why?


    @localhost config]# gdb prog
    GNU gdb Red Hat Linux (5.3.90-0.20030710.40rh )
    Copyright 2003 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for details.
    This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so .1".

    (gdb) run
    Starting program: config/prog

    ** starting the model **
    Creating this Directory for logs: /log
    mkdir: cannot create directory `/log': File exists

    Program received signal SIG32, Real-time event 32.
    0x080aed7f in __pthread_sigsu spend ()
    (gdb)
  • ashitpro
    Recognized Expert Contributor
    • Aug 2007
    • 542

    #2
    Could you please send the code...?
    Or send us the backtrace output..

    Comment

    • ashitpro
      Recognized Expert Contributor
      • Aug 2007
      • 542

      #3
      Could you please send the code...?
      Or send us the backtrace output..

      Comment

      • tvnaidu
        Contributor
        • Oct 2009
        • 365

        #4
        localhost config]# gdb prog
        GNU gdb Red Hat Linux (5.3.90-0.20030710.40rh )
        Copyright 2003 Free Software Foundation, Inc.
        GDB is free software, covered by the GNU General Public License, and you are
        welcome to change it and/or distribute copies of it under certain conditions.
        Type "show copying" to see the conditions.
        There is absolutely no warranty for GDB. Type "show warranty" for details.
        This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so .1".

        (gdb) run
        Starting program: ~/config/prog

        ** starting the model **

        Program received signal SIG32, Real-time event 32.
        0x080b10af in __pthread_sigsu spend ()
        (gdb) backtrace
        #0 0x080b10af in __pthread_sigsu spend ()
        #1 0x080b0335 in __pthread_wait_ for_restart_sig nal ()
        #2 0x080b0597 in pthread_create ()
        #3 0x08095323 in start_HTTPSende r (cfgPtr=0x82043 08) at SenderQ.c:293
        #4 0x080963a3 in start_sender (cfgPtr=0x82043 08) at SenderQ.c:858
        #5 0x08093004 in SenderStart () at xml_str.c:676
        #6 0x08081616 in MdInitialize ()
        #7 0x08048936 in main ()
        (gdb)

        Comment

        • ashitpro
          Recognized Expert Contributor
          • Aug 2007
          • 542

          #5
          This is known problem..

          Comment

          • tvnaidu
            Contributor
            • Oct 2009
            • 365

            #6
            I found "pthread_at tr_t attr" was declared as global like "static pthread_attr_t attr", I moved this to locally as "pthread_at tr_t attr", then I compiled and try to run, this time when I run with gdb, it terminated by SIGKILL:

            localhost config]# gdb ./prog
            GNU gdb Red Hat Linux (5.3.90-0.20030710.40rh )
            Copyright 2003 Free Software Foundation, Inc.
            GDB is free software, covered by the GNU General Public License, and you are
            welcome to change it and/or distribute copies of it under certain conditions.
            Type "show copying" to see the conditions.
            There is absolutely no warranty for GDB. Type "show warranty" for details.
            This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so .1".

            (gdb) run
            Starting program: ~/config/prog

            ** starting the model **
            Creating this Directory for logs: /log
            mkdir: cannot create directory `/log': File exists

            Program terminated with signal SIGKILL, Killed.
            The program no longer exists.
            (gdb) backtrace
            No stack.
            (gdb) quit
            [root@localhost config]#

            Comment

            • tvnaidu
              Contributor
              • Oct 2009
              • 365

              #7
              I got your link, any work around for this?. I am thinking some issue with my ported code from windows.

              Comment

              • tvnaidu
                Contributor
                • Oct 2009
                • 365

                #8
                if I run my app without GDB, also it gets "Killed", that is why I am running with GDB to see what is happening, anyway can I debug my app?.

                Comment

                • ashitpro
                  Recognized Expert Contributor
                  • Aug 2007
                  • 542

                  #9
                  seems like pthread library is not getting linked properly...
                  Can you try running that on other machine? Or may be reinstalling the pthread..
                  Also, see if there is any LD_ASSUME_KERNE L environment variable set....

                  Comment

                  Working...