Interpreting the unhandled signal exception in Linux

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite
2












I'm trying to debug a prototype CPU that throws unhandled signal 11s and signal 7s in the startup process.



Here is what the kernel prints out. I have added extra print statements to the kernel to debug exactly which userspace processes are exhibiting the error.



[ 0.880000] Execing: /usr/bin/readlink
[ 0.884000] readlink[85]: unhandled signal 7 code 0x1 at 0x00000020000b8f60 in libc-2.26.so[2000049000+13e000]
[ 0.884000] CPU: 0 PID: 85 Comm: readlink Not tainted 4.15.0-rc6-31580-g9c3074b5c2cd-dirty #20
[ 0.884000] sepc: 00000020000b8f60 ra : 00000020000b8d2c sp : 0000003ffffd9a60
[ 0.884000] gp : 00000000001028a8 tp : 0000002000192710 t0 : 0000000000000458
[ 0.884000] t1 : 00000020000aae98 t2 : ffffffffffffffff s0 : 000000200018d468
[ 0.884000] s1 : 000000200018e7d0 a0 : 000000200018e810 a1 : 000000200018c768
[ 0.884000] a2 : fffffffffbad2884 a3 : 0000000000008000 a4 : 000000200018ef38
[ 0.884000] a5 : 0000000000000001 a6 : 0000000000000000 a7 : 0000000000000040
[ 0.884000] s2 : 0000000000000001 s3 : 0000002000192010 s4 : 000000200018c4b0
[ 0.884000] s5 : 0000000000000001 s6 : 000000200018dd58 s7 : 0000000000000000
[ 0.884000] s8 : 00000000000e3388 s9 : 0000000000000040 s10: 000000000009c000
[ 0.884000] s11: 0000000000000048 t3 : 0000000000061e98 t4 : 0000000000000002
[ 0.884000] t5 : 000000200004bb64 t6 : 0000000000000000
[ 0.884000] sstatus: 8000000200006020 sbadaddr: 0000000006200893 scause: 0000000000000006
[ 0.888000] Execing: /bin/rm


Here I see an unhandled signal 7 in readlink, which is executing some libc function. My question is, how do I determine which instruction in libc is causing this? The machine status printout does not include the instruction, only the sepc. Since libc is dynamically linked, I'm not sure how to find its reference in libc's code.







share|improve this question

























    up vote
    1
    down vote

    favorite
    2












    I'm trying to debug a prototype CPU that throws unhandled signal 11s and signal 7s in the startup process.



    Here is what the kernel prints out. I have added extra print statements to the kernel to debug exactly which userspace processes are exhibiting the error.



    [ 0.880000] Execing: /usr/bin/readlink
    [ 0.884000] readlink[85]: unhandled signal 7 code 0x1 at 0x00000020000b8f60 in libc-2.26.so[2000049000+13e000]
    [ 0.884000] CPU: 0 PID: 85 Comm: readlink Not tainted 4.15.0-rc6-31580-g9c3074b5c2cd-dirty #20
    [ 0.884000] sepc: 00000020000b8f60 ra : 00000020000b8d2c sp : 0000003ffffd9a60
    [ 0.884000] gp : 00000000001028a8 tp : 0000002000192710 t0 : 0000000000000458
    [ 0.884000] t1 : 00000020000aae98 t2 : ffffffffffffffff s0 : 000000200018d468
    [ 0.884000] s1 : 000000200018e7d0 a0 : 000000200018e810 a1 : 000000200018c768
    [ 0.884000] a2 : fffffffffbad2884 a3 : 0000000000008000 a4 : 000000200018ef38
    [ 0.884000] a5 : 0000000000000001 a6 : 0000000000000000 a7 : 0000000000000040
    [ 0.884000] s2 : 0000000000000001 s3 : 0000002000192010 s4 : 000000200018c4b0
    [ 0.884000] s5 : 0000000000000001 s6 : 000000200018dd58 s7 : 0000000000000000
    [ 0.884000] s8 : 00000000000e3388 s9 : 0000000000000040 s10: 000000000009c000
    [ 0.884000] s11: 0000000000000048 t3 : 0000000000061e98 t4 : 0000000000000002
    [ 0.884000] t5 : 000000200004bb64 t6 : 0000000000000000
    [ 0.884000] sstatus: 8000000200006020 sbadaddr: 0000000006200893 scause: 0000000000000006
    [ 0.888000] Execing: /bin/rm


    Here I see an unhandled signal 7 in readlink, which is executing some libc function. My question is, how do I determine which instruction in libc is causing this? The machine status printout does not include the instruction, only the sepc. Since libc is dynamically linked, I'm not sure how to find its reference in libc's code.







    share|improve this question





















      up vote
      1
      down vote

      favorite
      2









      up vote
      1
      down vote

      favorite
      2






      2





      I'm trying to debug a prototype CPU that throws unhandled signal 11s and signal 7s in the startup process.



      Here is what the kernel prints out. I have added extra print statements to the kernel to debug exactly which userspace processes are exhibiting the error.



      [ 0.880000] Execing: /usr/bin/readlink
      [ 0.884000] readlink[85]: unhandled signal 7 code 0x1 at 0x00000020000b8f60 in libc-2.26.so[2000049000+13e000]
      [ 0.884000] CPU: 0 PID: 85 Comm: readlink Not tainted 4.15.0-rc6-31580-g9c3074b5c2cd-dirty #20
      [ 0.884000] sepc: 00000020000b8f60 ra : 00000020000b8d2c sp : 0000003ffffd9a60
      [ 0.884000] gp : 00000000001028a8 tp : 0000002000192710 t0 : 0000000000000458
      [ 0.884000] t1 : 00000020000aae98 t2 : ffffffffffffffff s0 : 000000200018d468
      [ 0.884000] s1 : 000000200018e7d0 a0 : 000000200018e810 a1 : 000000200018c768
      [ 0.884000] a2 : fffffffffbad2884 a3 : 0000000000008000 a4 : 000000200018ef38
      [ 0.884000] a5 : 0000000000000001 a6 : 0000000000000000 a7 : 0000000000000040
      [ 0.884000] s2 : 0000000000000001 s3 : 0000002000192010 s4 : 000000200018c4b0
      [ 0.884000] s5 : 0000000000000001 s6 : 000000200018dd58 s7 : 0000000000000000
      [ 0.884000] s8 : 00000000000e3388 s9 : 0000000000000040 s10: 000000000009c000
      [ 0.884000] s11: 0000000000000048 t3 : 0000000000061e98 t4 : 0000000000000002
      [ 0.884000] t5 : 000000200004bb64 t6 : 0000000000000000
      [ 0.884000] sstatus: 8000000200006020 sbadaddr: 0000000006200893 scause: 0000000000000006
      [ 0.888000] Execing: /bin/rm


      Here I see an unhandled signal 7 in readlink, which is executing some libc function. My question is, how do I determine which instruction in libc is causing this? The machine status printout does not include the instruction, only the sepc. Since libc is dynamically linked, I'm not sure how to find its reference in libc's code.







      share|improve this question











      I'm trying to debug a prototype CPU that throws unhandled signal 11s and signal 7s in the startup process.



      Here is what the kernel prints out. I have added extra print statements to the kernel to debug exactly which userspace processes are exhibiting the error.



      [ 0.880000] Execing: /usr/bin/readlink
      [ 0.884000] readlink[85]: unhandled signal 7 code 0x1 at 0x00000020000b8f60 in libc-2.26.so[2000049000+13e000]
      [ 0.884000] CPU: 0 PID: 85 Comm: readlink Not tainted 4.15.0-rc6-31580-g9c3074b5c2cd-dirty #20
      [ 0.884000] sepc: 00000020000b8f60 ra : 00000020000b8d2c sp : 0000003ffffd9a60
      [ 0.884000] gp : 00000000001028a8 tp : 0000002000192710 t0 : 0000000000000458
      [ 0.884000] t1 : 00000020000aae98 t2 : ffffffffffffffff s0 : 000000200018d468
      [ 0.884000] s1 : 000000200018e7d0 a0 : 000000200018e810 a1 : 000000200018c768
      [ 0.884000] a2 : fffffffffbad2884 a3 : 0000000000008000 a4 : 000000200018ef38
      [ 0.884000] a5 : 0000000000000001 a6 : 0000000000000000 a7 : 0000000000000040
      [ 0.884000] s2 : 0000000000000001 s3 : 0000002000192010 s4 : 000000200018c4b0
      [ 0.884000] s5 : 0000000000000001 s6 : 000000200018dd58 s7 : 0000000000000000
      [ 0.884000] s8 : 00000000000e3388 s9 : 0000000000000040 s10: 000000000009c000
      [ 0.884000] s11: 0000000000000048 t3 : 0000000000061e98 t4 : 0000000000000002
      [ 0.884000] t5 : 000000200004bb64 t6 : 0000000000000000
      [ 0.884000] sstatus: 8000000200006020 sbadaddr: 0000000006200893 scause: 0000000000000006
      [ 0.888000] Execing: /bin/rm


      Here I see an unhandled signal 7 in readlink, which is executing some libc function. My question is, how do I determine which instruction in libc is causing this? The machine status printout does not include the instruction, only the sepc. Since libc is dynamically linked, I'm not sure how to find its reference in libc's code.









      share|improve this question










      share|improve this question




      share|improve this question









      asked Aug 3 at 17:02









      Jerry Zhao

      83




      83




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          If I'm reading the kernel's source correctly, this line:



          readlink[85]: unhandled signal 7 code 0x1 at 0x00000020000b8f60 in libc-2.26.so[2000049000+13e000]


          Tells you what you need to know. libc is loaded at hexadecimal 0x2000049000, and is 0x13e000 bytes long. The address that the signal happened at is 0x00000020000b8f60. In order to figure out where relative to libc the error happens, compute 0x00000020000b8f60 - 0x2000049000.



          I get 0x6ff60, so look for that location in objdump -d libc... or nm -g libc....






          share|improve this answer





















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460382%2finterpreting-the-unhandled-signal-exception-in-linux%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote



            accepted










            If I'm reading the kernel's source correctly, this line:



            readlink[85]: unhandled signal 7 code 0x1 at 0x00000020000b8f60 in libc-2.26.so[2000049000+13e000]


            Tells you what you need to know. libc is loaded at hexadecimal 0x2000049000, and is 0x13e000 bytes long. The address that the signal happened at is 0x00000020000b8f60. In order to figure out where relative to libc the error happens, compute 0x00000020000b8f60 - 0x2000049000.



            I get 0x6ff60, so look for that location in objdump -d libc... or nm -g libc....






            share|improve this answer

























              up vote
              2
              down vote



              accepted










              If I'm reading the kernel's source correctly, this line:



              readlink[85]: unhandled signal 7 code 0x1 at 0x00000020000b8f60 in libc-2.26.so[2000049000+13e000]


              Tells you what you need to know. libc is loaded at hexadecimal 0x2000049000, and is 0x13e000 bytes long. The address that the signal happened at is 0x00000020000b8f60. In order to figure out where relative to libc the error happens, compute 0x00000020000b8f60 - 0x2000049000.



              I get 0x6ff60, so look for that location in objdump -d libc... or nm -g libc....






              share|improve this answer























                up vote
                2
                down vote



                accepted







                up vote
                2
                down vote



                accepted






                If I'm reading the kernel's source correctly, this line:



                readlink[85]: unhandled signal 7 code 0x1 at 0x00000020000b8f60 in libc-2.26.so[2000049000+13e000]


                Tells you what you need to know. libc is loaded at hexadecimal 0x2000049000, and is 0x13e000 bytes long. The address that the signal happened at is 0x00000020000b8f60. In order to figure out where relative to libc the error happens, compute 0x00000020000b8f60 - 0x2000049000.



                I get 0x6ff60, so look for that location in objdump -d libc... or nm -g libc....






                share|improve this answer













                If I'm reading the kernel's source correctly, this line:



                readlink[85]: unhandled signal 7 code 0x1 at 0x00000020000b8f60 in libc-2.26.so[2000049000+13e000]


                Tells you what you need to know. libc is loaded at hexadecimal 0x2000049000, and is 0x13e000 bytes long. The address that the signal happened at is 0x00000020000b8f60. In order to figure out where relative to libc the error happens, compute 0x00000020000b8f60 - 0x2000049000.



                I get 0x6ff60, so look for that location in objdump -d libc... or nm -g libc....







                share|improve this answer













                share|improve this answer



                share|improve this answer











                answered Aug 3 at 17:57









                Nick ODell

                8922819




                8922819






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460382%2finterpreting-the-unhandled-signal-exception-in-linux%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay