Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file_name is often missing in CCpp uReport frames #127

Open
mtoman opened this issue Nov 1, 2013 · 6 comments
Open

file_name is often missing in CCpp uReport frames #127

mtoman opened this issue Nov 1, 2013 · 6 comments
Labels

Comments

@mtoman
Copy link
Contributor

mtoman commented Nov 1, 2013

Example:

{   "ureport_version": 2
,   "reason": "Program /usr/libexec/glib-pacrunner was terminated by signal 11"
,   "reporter": {   "name": "satyr"
                ,   "version": "0.10"
                }
,   "os": {   "name": "fedora"
          ,   "version": "19"
          ,   "architecture": "x86_64"
          ,   "cpe": "cpe:/o:fedoraproject:fedora:19"
          }
,   "problem": {   "type": "core"
               ,   "component": "glib-networking"
               ,   "user": {   "root": false
                           ,   "local": true
                           }
               ,   "signal": 11
               ,   "executable": "/usr/libexec/glib-pacrunner"
               ,   "stacktrace":
                     [ {   "frames":
                             [ {   "address": 140224643409997
                               ,   "build_id": "f47cec2a689de012d8eba76ae17ea0996aea03f2"
                               ,   "build_id_offset": 964685
                               }
                             , {   "address": 265862545652
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 295156
                               }
                             , {   "address": 265862546778
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 296282
                               }
                             , {   "address": 4200424
                               ,   "build_id": "7750707110f6ca7f4f0a9c81ebec835c50e59a0b"
                               ,   "build_id_offset": 6120
                               ,   "function_name": "main"
                               ,   "file_name": "/usr/libexec/glib-pacrunner"
                               ,   "fingerprint": "ff8cd1ebd594538f4af7808e25cf1ff5c312e037"
                               } ]
                       }
                     , {   "frames":
                             [ {   "address": 140224638176749
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 56813
                               }
                             , {   "address": 140224638159777
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 39841
                               }
                             , {   "address": 140224638159527
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 39591
                               }
                             , {   "address": 140224646445568
                               ,   "build_id": "7a6ec8f0dab01b96bf205d1fb475a1a91684c22f"
                               ,   "build_id_offset": 64000
                               }
                             , {   "address": 140224646447167
                               ,   "build_id": "7a6ec8f0dab01b96bf205d1fb475a1a91684c22f"
                               ,   "build_id_offset": 65599
                               }
                             , {   "address": 4200908
                               ,   "build_id": "7750707110f6ca7f4f0a9c81ebec835c50e59a0b"
                               ,   "build_id_offset": 6604
                               ,   "function_name": "get_libproxy_proxies"
                               ,   "file_name": "/usr/libexec/glib-pacrunner"
                               ,   "fingerprint": "760fc7b74545c4720d67aec70fa1e437f35bcc43"
                               }
                             , {   "address": 265879519397
                               ,   "build_id": "cb6de6eefb469501e160697eb4d68d8ef352c59d"
                               ,   "build_id_offset": 491685
                               }
                             , {   "address": 265862695750
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 445254
                               }
                             , {   "address": 265862693253
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 442757
                               }
                             , {   "address": 140224638151763
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 31827
                               }
                             , {   "address": 140224643452445
                               ,   "build_id": "f47cec2a689de012d8eba76ae17ea0996aea03f2"
                               ,   "build_id_offset": 1007133
                               } ]
                       }
                     , {   "frames":
                             [ {   "address": 140224638167330
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 47394
                               }
                             , {   "address": 265862804917
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 554421
                               }
                             , {   "address": 265862376177
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 125681
                               }
                             , {   "address": 265862377595
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 127099
                               }
                             , {   "address": 265862695958
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 445462
                               }
                             , {   "address": 265862693253
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 442757
                               }
                             , {   "address": 140224638151763
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 31827
                               }
                             , {   "address": 140224643452445
                               ,   "build_id": "f47cec2a689de012d8eba76ae17ea0996aea03f2"
                               ,   "build_id_offset": 1007133
                               } ]
                       }
                     , {   "frames":
                             [ {   "address": 140224638167330
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 47394
                               }
                             , {   "address": 265862804917
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 554421
                               }
                             , {   "address": 265862376177
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 125681
                               }
                             , {   "address": 265862695704
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 445208
                               }
                             , {   "address": 265862693253
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 442757
                               }
                             , {   "address": 140224638151763
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 31827
                               }
                             , {   "address": 140224643452445
                               ,   "build_id": "f47cec2a689de012d8eba76ae17ea0996aea03f2"
                               ,   "build_id_offset": 1007133
                               } ]
                       }
                     , {   "frames":
                             [ {   "address": 140224638166389
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 46453
                               }
                             , {   "address": 266195840208
                               ,   "build_id": "9dc97e9d0d7c31ea5b6470169a7c61bb6b608c25"
                               ,   "build_id_offset": 142544
                               }
                             , {   "address": 140224625801326
                               ,   "build_id": "da9f03650dfbe37b27f9e4763e725da6b4c96acc"
                               ,   "build_id_offset": 1308782
                               ,   "function_name": "_ZN2js22SourceCompressorThread10threadLoopEv"
                               ,   "file_name": "/lib64/libmozjs-17.0.so"
                               ,   "fingerprint": "337f9abe3cacab047198146308c7c8457bf53735"
                               }
                             , {   "address": 266195861169
                               ,   "build_id": "9dc97e9d0d7c31ea5b6470169a7c61bb6b608c25"
                               ,   "build_id_offset": 163505
                               }
                             , {   "address": 140224638151763
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 31827
                               }
                             , {   "address": 140224643452445
                               ,   "build_id": "f47cec2a689de012d8eba76ae17ea0996aea03f2"
                               ,   "build_id_offset": 1007133
                               } ]
                       }
                     , {   "frames":
                             [ {   "address": 140224643409997
                               ,   "build_id": "f47cec2a689de012d8eba76ae17ea0996aea03f2"
                               ,   "build_id_offset": 964685
                               }
                             , {   "address": 265862545652
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 295156
                               }
                             , {   "address": 265862546778
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 296282
                               }
                             , {   "address": 265879842150
                               ,   "build_id": "cb6de6eefb469501e160697eb4d68d8ef352c59d"
                               ,   "build_id_offset": 814438
                               }
                             , {   "address": 265862693253
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 442757
                               }
                             , {   "address": 140224638151763
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 31827
                               }
                             , {   "address": 140224643452445
                               ,   "build_id": "f47cec2a689de012d8eba76ae17ea0996aea03f2"
                               ,   "build_id_offset": 1007133
                               } ]
                       }
                     , {   "frames":
                             [ {   "address": 140224638176749
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 56813
                               }
                             , {   "address": 140224638159777
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 39841
                               }
                             , {   "address": 140224638159527
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 39591
                               }
                             , {   "address": 140224646445568
                               ,   "build_id": "7a6ec8f0dab01b96bf205d1fb475a1a91684c22f"
                               ,   "build_id_offset": 64000
                               }
                             , {   "address": 140224646447167
                               ,   "build_id": "7a6ec8f0dab01b96bf205d1fb475a1a91684c22f"
                               ,   "build_id_offset": 65599
                               }
                             , {   "address": 4200908
                               ,   "build_id": "7750707110f6ca7f4f0a9c81ebec835c50e59a0b"
                               ,   "build_id_offset": 6604
                               ,   "function_name": "get_libproxy_proxies"
                               ,   "file_name": "/usr/libexec/glib-pacrunner"
                               ,   "fingerprint": "760fc7b74545c4720d67aec70fa1e437f35bcc43"
                               }
                             , {   "address": 265879519397
                               ,   "build_id": "cb6de6eefb469501e160697eb4d68d8ef352c59d"
                               ,   "build_id_offset": 491685
                               }
                             , {   "address": 265862695750
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 445254
                               }
                             , {   "address": 265862693253
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 442757
                               }
                             , {   "address": 140224638151763
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 31827
                               }
                             , {   "address": 140224643452445
                               ,   "build_id": "f47cec2a689de012d8eba76ae17ea0996aea03f2"
                               ,   "build_id_offset": 1007133
                               } ]
                       }
                     , {   "frames":
                             [ {   "address": 140224638166389
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 46453
                               }
                             , {   "address": 266195840208
                               ,   "build_id": "9dc97e9d0d7c31ea5b6470169a7c61bb6b608c25"
                               ,   "build_id_offset": 142544
                               }
                             , {   "address": 140224625200208
                               ,   "build_id": "da9f03650dfbe37b27f9e4763e725da6b4c96acc"
                               ,   "build_id_offset": 707664
                               ,   "function_name": "_ZN2js14GCHelperThread10threadLoopEv"
                               ,   "file_name": "/lib64/libmozjs-17.0.so"
                               }
                             , {   "address": 266195861169
                               ,   "build_id": "9dc97e9d0d7c31ea5b6470169a7c61bb6b608c25"
                               ,   "build_id_offset": 163505
                               }
                             , {   "address": 140224638151763
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 31827
                               }
                             , {   "address": 140224643452445
                               ,   "build_id": "f47cec2a689de012d8eba76ae17ea0996aea03f2"
                               ,   "build_id_offset": 1007133
                               } ]
                       }
                     , {   "frames":
                             [ {   "address": 140224638176749
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 56813
                               }
                             , {   "address": 140224638159777
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 39841
                               }
                             , {   "address": 140224638159527
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 39591
                               }
                             , {   "address": 140224646445568
                               ,   "build_id": "7a6ec8f0dab01b96bf205d1fb475a1a91684c22f"
                               ,   "build_id_offset": 64000
                               }
                             , {   "address": 140224646447167
                               ,   "build_id": "7a6ec8f0dab01b96bf205d1fb475a1a91684c22f"
                               ,   "build_id_offset": 65599
                               }
                             , {   "address": 4200908
                               ,   "build_id": "7750707110f6ca7f4f0a9c81ebec835c50e59a0b"
                               ,   "build_id_offset": 6604
                               ,   "function_name": "get_libproxy_proxies"
                               ,   "file_name": "/usr/libexec/glib-pacrunner"
                               ,   "fingerprint": "760fc7b74545c4720d67aec70fa1e437f35bcc43"
                               }
                             , {   "address": 265879519397
                               ,   "build_id": "cb6de6eefb469501e160697eb4d68d8ef352c59d"
                               ,   "build_id_offset": 491685
                               }
                             , {   "address": 265862695750
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 445254
                               }
                             , {   "address": 265862693253
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 442757
                               }
                             , {   "address": 140224638151763
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 31827
                               }
                             , {   "address": 140224643452445
                               ,   "build_id": "f47cec2a689de012d8eba76ae17ea0996aea03f2"
                               ,   "build_id_offset": 1007133
                               } ]
                       }
                     , {   "frames":
                             [ {   "address": 140224638176749
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 56813
                               }
                             , {   "address": 140224638159777
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 39841
                               }
                             , {   "address": 140224638159527
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 39591
                               }
                             , {   "address": 140224646445568
                               ,   "build_id": "7a6ec8f0dab01b96bf205d1fb475a1a91684c22f"
                               ,   "build_id_offset": 64000
                               }
                             , {   "address": 140224646447167
                               ,   "build_id": "7a6ec8f0dab01b96bf205d1fb475a1a91684c22f"
                               ,   "build_id_offset": 65599
                               }
                             , {   "address": 4200908
                               ,   "build_id": "7750707110f6ca7f4f0a9c81ebec835c50e59a0b"
                               ,   "build_id_offset": 6604
                               ,   "function_name": "get_libproxy_proxies"
                               ,   "file_name": "/usr/libexec/glib-pacrunner"
                               ,   "fingerprint": "760fc7b74545c4720d67aec70fa1e437f35bcc43"
                               }
                             , {   "address": 265879519397
                               ,   "build_id": "cb6de6eefb469501e160697eb4d68d8ef352c59d"
                               ,   "build_id_offset": 491685
                               }
                             , {   "address": 265862695750
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 445254
                               }
                             , {   "address": 265862693253
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 442757
                               }
                             , {   "address": 140224638151763
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 31827
                               }
                             , {   "address": 140224643452445
                               ,   "build_id": "f47cec2a689de012d8eba76ae17ea0996aea03f2"
                               ,   "build_id_offset": 1007133
                               } ]
                       }
                     , {   "crash_thread": true
                       ,   "frames":
                             [ {   "address": 140224624806930
                               ,   "build_id": "da9f03650dfbe37b27f9e4763e725da6b4c96acc"
                               ,   "build_id_offset": 314386
                               ,   "function_name": "JS_AbortIfWrongThread"
                               ,   "file_name": "/lib64/libmozjs-17.0.so"
                               ,   "fingerprint": "21b0f96dbb6e06f619c2ed9a03312df10ffa5e7b"
                               }
                             , {   "address": 140224624952360
                               ,   "build_id": "da9f03650dfbe37b27f9e4763e725da6b4c96acc"
                               ,   "build_id_offset": 459816
                               ,   "function_name": "_ZN2js14DestroyContextEP9JSContextNS_18DestroyContextModeE"
                               ,   "file_name": "/lib64/libmozjs-17.0.so"
                               }
                             , {   "address": 140224630649228
                               ,   "build_id": "a8a8a3864c5adb2ce6b3d6cfe4ca6688df29bce1"
                               ,   "build_id_offset": 8588
                               ,   "function_name": "_ZN15mozjs_pacrunnerD0Ev"
                               ,   "file_name": "/usr/lib64/libproxy/0.4.11/modules/pacrunner_mozjs.so"
                               ,   "fingerprint": "cdb3e0c652850a9ffbef030cea623c59dc13117d"
                               }
                             , {   "address": 140224646421512
                               ,   "build_id": "7a6ec8f0dab01b96bf205d1fb475a1a91684c22f"
                               ,   "build_id_offset": 39944
                               }
                             , {   "address": 140224646443700
                               ,   "build_id": "7a6ec8f0dab01b96bf205d1fb475a1a91684c22f"
                               ,   "build_id_offset": 62132
                               }
                             , {   "address": 140224646445778
                               ,   "build_id": "7a6ec8f0dab01b96bf205d1fb475a1a91684c22f"
                               ,   "build_id_offset": 64210
                               }
                             , {   "address": 140224646447167
                               ,   "build_id": "7a6ec8f0dab01b96bf205d1fb475a1a91684c22f"
                               ,   "build_id_offset": 65599
                               }
                             , {   "address": 4200908
                               ,   "build_id": "7750707110f6ca7f4f0a9c81ebec835c50e59a0b"
                               ,   "build_id_offset": 6604
                               ,   "function_name": "get_libproxy_proxies"
                               ,   "file_name": "/usr/libexec/glib-pacrunner"
                               ,   "fingerprint": "760fc7b74545c4720d67aec70fa1e437f35bcc43"
                               }
                             , {   "address": 265879519397
                               ,   "build_id": "cb6de6eefb469501e160697eb4d68d8ef352c59d"
                               ,   "build_id_offset": 491685
                               }
                             , {   "address": 265862695750
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 445254
                               }
                             , {   "address": 265862693253
                               ,   "build_id": "e1a401c535a0feb8b026f35115edd0ce77fa9afd"
                               ,   "build_id_offset": 442757
                               }
                             , {   "address": 140224638151763
                               ,   "build_id": "b5c2520602591e2e6afcf328e554cd0c2dd11bf5"
                               ,   "build_id_offset": 31827
                               }
                             , {   "address": 140224643452445
                               ,   "build_id": "f47cec2a689de012d8eba76ae17ea0996aea03f2"
                               ,   "build_id_offset": 1007133
                               } ]
                       } ]
               }
,   "packages": [ {   "name": "glib-networking"
                  ,   "epoch": 0
                  ,   "version": "2.36.2"
                  ,   "release": "1.fc19"
                  ,   "architecture": "x86_64"
                  ,   "install_time": 1372872302
                  ,   "package_role": "affected"
                  }
                , {   "name": "glibc"
                  ,   "epoch": 0
                  ,   "version": "2.17"
                  ,   "release": "18.fc19"
                  ,   "architecture": "x86_64"
                  ,   "install_time": 1380449567
                  }
                , {   "name": "libproxy-mozjs"
                  ,   "epoch": 0
                  ,   "version": "0.4.11"
                  ,   "release": "6.fc19"
                  ,   "architecture": "x86_64"
                  ,   "install_time": 1380539437
                  }
                , {   "name": "mozjs17"
                  ,   "epoch": 0
                  ,   "version": "17.0.0"
                  ,   "release": "7.fc19"
                  ,   "architecture": "x86_64"
                  ,   "install_time": 1372872288
                  }
                , {   "name": "nspr"
                  ,   "epoch": 0
                  ,   "version": "4.10.0"
                  ,   "release": "3.fc19"
                  ,   "architecture": "x86_64"
                  ,   "install_time": 1373280229
                  }
                , {   "name": "nss-mdns"
                  ,   "epoch": 0
                  ,   "version": "0.10"
                  ,   "release": "12.fc19"
                  ,   "architecture": "x86_64"
                  ,   "install_time": 1372872341
                  }
                , {   "name": "systemd-libs"
                  ,   "epoch": 0
                  ,   "version": "204"
                  ,   "release": "15.fc19"
                  ,   "architecture": "x86_64"
                  ,   "install_time": 1379762609
                  }
                , {   "name": "zlib"
                  ,   "epoch": 0
                  ,   "version": "1.2.7"
                  ,   "release": "10.fc19"
                  ,   "architecture": "x86_64"
                  ,   "install_time": 1372872234
                  } ]
}
@mmilata
Copy link
Contributor

mmilata commented Nov 1, 2013

I have no idea why this happens. Can you perhaps send me some more reports like this? Perhaps we'll be able to spot some pattern.

@mtoman
Copy link
Contributor Author

mtoman commented Nov 4, 2013

@mmilata
Copy link
Contributor

mmilata commented Nov 5, 2013

From 1224 reports (only ureport 2 considered):

  • 50 are only missing file_name in the crash frame ... perhaps jump to invalid address occurred?
  • 367 are only missing file_name for frames belonging to VDSO
  • 47 are only missing file_name below __libc_start_main frame - this is caused by missing main function name, which confuses gdb; mainly google-chrome-* components are affected

Missing file_name happens when an executable/library is not available at the time of the stack unwinding. It does not seem to happen when the file is replaced by something else. Reproducer:

$ evince
# mv /usr/lib64/gio/modules/libdconfsettings.so ~
# pkill -11 evince
# mv ~/libdconfsettings.so /usr/lib64/gio/modules/

I'm planning to investitgate whether we can prevent this situation. What about the VDSO, is this alright or should it also be fixed?

(2013-11-06 update: frames below main/__libc_start_main)

@mmilata
Copy link
Contributor

mmilata commented Nov 8, 2013

Note: it looks like all the reports used GDB for unwinding

satyr versions: Counter({'0.10': 408, '0.11': 270, '0.9': 52, '0.7': 3}) (GDB is used in 0.5 and higher)

@mmilata
Copy link
Contributor

mmilata commented Jun 17, 2014

Re: the core dump you sent me that reproduces this problem
When opened in GDB, it complains that warning: Corrupted shared library list: 0x7fc77ea34228 != 0x21c8970.

I wrote a script to print out this library list (it requires git version of pyelftools): http://mmilata.fedorapeople.org/core-link-map.py
Here's the output for the last couple of libraries before the corruption:

link_map @ 0x7fc77ea35550
addr:   0x0
next:   0x7fc77ea35a30
prev:   0x7fc77ea35000
l_ld:   Container({'d_tag': 'DT_NEEDED', 'd_ptr': 2628, 'd_val': 2628})
l_name: /lib64/libkrb5support.so.0

link_map @ 0x7fc77ea35a30
addr:   0x0
next:   0x7fc77ea34228
prev:   0x7fc77ea35550
l_ld:   Container({'d_tag': 'DT_NEEDED', 'd_ptr': 892, 'd_val': 892})
l_name: /lib64/libkeyutils.so.1

link_map @ 0x7fc77ea34228
addr:   0x0
next:   0x21b3ff0
prev:   0x7fc77ea35a30
l_ld:   Container({'d_tag': 'DT_NEEDED', 'd_ptr': 862, 'd_val': 862})
l_name: /lib64/libpcre.so.1

link_map @ 0x21b3ff0
addr:   0x4c1
next:   0x7fc778501e08
prev:   0x21c8970
l_ld:   Container({'d_tag': 49, 'd_ptr': 7091318039310988591, 'd_val': 7091318039310988591})
l_name: ELF
        PREV LINK MISMATCH

link_map @ 0x7fc778501e08
addr:   0x1
next:   0x5e8
prev:   0xd
l_ld:   Container({'d_tag': 1163022147, 'd_ptr': 11, 'd_val': 11})
l_name:
        PREV LINK MISMATCH

The problem seems to be that the next link of the /lib64/libpcre.so.1 element points to 0x21b3ff0, which does not seem to contain a valid entry.

Curiously:

  • 0x21b3ff0 is address on the heap
  • other fields of the libpcre item structure seems to be intact, just the next link does not make sense

It would be great if we could get our hands on couple more of coredumps with this issue.

I'll try to workaround this so that the unwinding does not depent on the internal shared library list (we should be able to get this information from the maps file instead).

mmilata added a commit that referenced this issue Jun 23, 2014
Until now, elfutils used dynamic loader internal structure to find the
shared libraries needed for unwinding and symbol resolution. This
structure was sometimes damaged and it seems that getting this info from
the maps file is more reliable in some other cases as well (vdso).

Related #127.

Signed-off-by: Martin Milata <[email protected]>
mmilata added a commit that referenced this issue Jun 24, 2014
Consistent with the sr_parse_coredump stub function. (Implementation
note: the sr_parse_coredump wrapper was moved to core_unwind.c in order
not to have it duplicated three times.)

Related to #127.

Signed-off-by: Martin Milata <[email protected]>
@mmilata
Copy link
Contributor

mmilata commented Jun 24, 2014

I analyzed couple of core dumps with this issue and the causes I was able to determine are following:

  1. Invalid address in topmost frame (4 cores, see ureport: allow empty file_name/build_id for topmost frame faf#239).
  2. Broken internal shared library list (3 cores), should be worked around by d06baf1.
  3. Possible elfutils problem (3 cores) - might be worked around by d06baf1 as well.
  4. Bad resolving of vDSO frames (3 cores), should be fixed in bbf0399 (probably only happens on i686).
  5. Packages from rpmfusion (2 cores).

I'd like to revisit this bug in the future after these fixes are in effect for some time so I'm keeping it open.

mmilata added a commit to mmilata/will-crash that referenced this issue Sep 8, 2014
Related to abrt/satyr#127 and rhbz#1129777.

Signed-off-by: Martin Milata <[email protected]>
mmilata added a commit to mmilata/will-crash that referenced this issue Sep 8, 2014
Related to abrt/satyr#127 and rhbz#1129777.

Signed-off-by: Martin Milata <[email protected]>
mmilata added a commit to mmilata/will-crash that referenced this issue Sep 8, 2014
Related to abrt/satyr#127 and rhbz#1129777.

Signed-off-by: Martin Milata <[email protected]>
mmilata added a commit to mmilata/will-crash that referenced this issue Sep 8, 2014
Related to abrt/satyr#127 and rhbz#1129777.

Signed-off-by: Martin Milata <[email protected]>
gregnietsky pushed a commit to Distrotech/elfutils that referenced this issue Oct 2, 2014
Martin Milata:
------------------------------------------------------------------------------
RFE: dwfl_core_file_report: use NT_FILE core note if the link_map chain is broken
https://bugzilla.redhat.com/show_bug.cgi?id=1129777

The dwfl_core_file_report function follows dynamic linker's link_map chain in
order to determine the shared libraries used by the executable. As this data
structure is located in writable memory it can be overwritten by garbage, which
is sometimes the case.
	abrt/satyr#127 (comment)

Since version 3.7 (commit 2aa362c49), Linux kernel adds NT_FILE note to core
files which contains the files mapped by the process, including shared
libraries.
------------------------------------------------------------------------------

dwfl_core_file_report now tries to fall back on NT_FILE if the link_map chain
is broken.

elfutils would already find the appropriate binary file from
/usr/lib/debug/.build-id/ symbolic links.  But those symbolic links do not have
to be present on the system while NT_FILE still points to the correct binaries.

Filenames from the note NT_FILE are used only if link_map filenames failed to
locate matching binaries.

tests/test-core.core.bz2 had to have its NT_FILE disabled as run-unstrip-n.sh
otherwise FAILs:
FAIL: 0x7f67f2aaf000+0x202000 - . - /home/jkratoch/redhat/elfutils-libregr/test-core-lib.so
PASS: 0x7f67f2aaf000+0x202000 - . - test-core-lib.so
As test-core-lib.so is found in link_map but it is not present on the disk
elfutils now chooses the more reliable filename from NT_FILE (although that
filename is also not found on the disk).  Updating the expected text would be
also sufficient.

libdwfl/
2014-09-18  Jan Kratochvil  <[email protected]>

	Support NT_FILE for locating files.
	* core-file.c (dwfl_core_file_report): New variables note_file and
	note_file_size, set them and pass them to dwfl_segment_report_module.
	* dwfl_segment_report_module.c: Include common.h and fcntl.h.
	(buf_has_data, buf_read_ulong, handle_file_note): New functions.
	(invalid_elf): New function from code of dwfl_segment_report_module.
	(dwfl_segment_report_module): Add parameters note_file and
	note_file_size.  New variables elf and fd, clean them up in finish.
	Move some code to invalid_elf.  Call handle_file_note, if it found
	a name verify the file by invalid_elf.  Protect elf and fd against
	cleanup by finish if we found the file for new Dwfl_Module.
	* libdwflP.h (dwfl_segment_report_module): Add parameters note_file and
	note_file_size.

tests/
2014-09-18  Jan Kratochvil  <[email protected]>

	Support NT_FILE for locating files.
	* Makefile.am (TESTS): Add run-linkmap-cut.sh.
	(EXTRA_DIST): Add run-linkmap-cut.sh, linkmap-cut-lib.so.bz2,
	linkmap-cut.bz2 and linkmap-cut.core.bz2 .
	* linkmap-cut-lib.so.bz2: New file.
	* linkmap-cut.bz2: New file.
	* linkmap-cut.core.bz2: New file.
	* run-linkmap-cut.sh: New file.
	* test-core.core.bz2: Disable its NT_FILE note.

Signed-off-by: Jan Kratochvil <[email protected]>
gregnietsky pushed a commit to Distrotech/elfutils that referenced this issue Oct 2, 2014
Martin Milata:
------------------------------------------------------------------------------
RFE: dwfl_core_file_report: use NT_FILE core note if the link_map chain is broken
https://bugzilla.redhat.com/show_bug.cgi?id=1129777

The dwfl_core_file_report function follows dynamic linker's link_map chain in
order to determine the shared libraries used by the executable. As this data
structure is located in writable memory it can be overwritten by garbage, which
is sometimes the case.
	abrt/satyr#127 (comment)

Since version 3.7 (commit 2aa362c49), Linux kernel adds NT_FILE note to core
files which contains the files mapped by the process, including shared
libraries.
------------------------------------------------------------------------------

dwfl_core_file_report now tries to fall back on NT_FILE if the link_map chain
is broken.

elfutils would already find the appropriate binary file from
/usr/lib/debug/.build-id/ symbolic links.  But those symbolic links do not have
to be present on the system while NT_FILE still points to the correct binaries.

Filenames from the note NT_FILE are used only if link_map filenames failed to
locate matching binaries.

tests/test-core.core.bz2 had to have its NT_FILE disabled as run-unstrip-n.sh
otherwise FAILs:
FAIL: 0x7f67f2aaf000+0x202000 - . - /home/jkratoch/redhat/elfutils-libregr/test-core-lib.so
PASS: 0x7f67f2aaf000+0x202000 - . - test-core-lib.so
As test-core-lib.so is found in link_map but it is not present on the disk
elfutils now chooses the more reliable filename from NT_FILE (although that
filename is also not found on the disk).  Updating the expected text would be
also sufficient.

libdwfl/
2014-09-26  Jan Kratochvil  <[email protected]>

	Support NT_FILE for locating files.
	* core-file.c (dwfl_core_file_report): New variables note_file and
	note_file_size, set them and pass them to dwfl_segment_report_module.
	* dwfl_segment_report_module.c: Include common.h and fcntl.h.
	(buf_has_data, buf_read_ulong, handle_file_note): New functions.
	(invalid_elf): New function from code of dwfl_segment_report_module.
	(dwfl_segment_report_module): Add parameters note_file and
	note_file_size.  New variables elf and fd, clean them up in finish.
	Move some code to invalid_elf.  Call handle_file_note, if it found
	a name verify the file by invalid_elf.  Protect elf and fd against
	cleanup by finish if we found the file for new Dwfl_Module.
	* libdwflP.h (dwfl_segment_report_module): Add parameters note_file and
	note_file_size.

tests/
2014-09-26  Jan Kratochvil  <[email protected]>

	Support NT_FILE for locating files.
	* Makefile.am (TESTS): Add run-linkmap-cut.sh.
	(EXTRA_DIST): Add run-linkmap-cut.sh, linkmap-cut-lib.so.bz2,
	linkmap-cut.bz2 and linkmap-cut.core.bz2 .
	* linkmap-cut-lib.so.bz2: New file.
	* linkmap-cut.bz2: New file.
	* linkmap-cut.core.bz2: New file.
	* run-linkmap-cut.sh: New file.
	* run-unstrip-n.sh: Update its expected output.

Signed-off-by: Jan Kratochvil <[email protected]>
hustwei pushed a commit to hustwei/elfutils that referenced this issue Oct 21, 2016
Martin Milata:
------------------------------------------------------------------------------
RFE: dwfl_core_file_report: use NT_FILE core note if the link_map chain is broken
https://bugzilla.redhat.com/show_bug.cgi?id=1129777

The dwfl_core_file_report function follows dynamic linker's link_map chain in
order to determine the shared libraries used by the executable. As this data
structure is located in writable memory it can be overwritten by garbage, which
is sometimes the case.
	abrt/satyr#127 (comment)

Since version 3.7 (commit 2aa362c49), Linux kernel adds NT_FILE note to core
files which contains the files mapped by the process, including shared
libraries.
------------------------------------------------------------------------------
dwfl_core_file_report now tries to fall back on NT_FILE if the link_map chain
is broken.

elfutils would already find the appropriate binary file from
/usr/lib/debug/.build-id/ symbolic links.  But those symbolic links do not have
to be present on the system while NT_FILE still points to the correct binaries.

Filenames from the note NT_FILE are used only if link_map filenames failed to
locate matching binaries.

tests/test-core.core.bz2 had to have its NT_FILE disabled as run-unstrip-n.sh
otherwise FAILs:
FAIL: 0x7f67f2aaf000+0x202000 - . - /home/jkratoch/redhat/elfutils-libregr/test-core-lib.so
PASS: 0x7f67f2aaf000+0x202000 - . - test-core-lib.so
As test-core-lib.so is found in link_map but it is not present on the disk
elfutils now chooses the more reliable filename from NT_FILE (although that
filename is also not found on the disk).  Updating the expected text would be
also sufficient.

libdwfl/
2014-09-09  Jan Kratochvil  <[email protected]>

	Support NT_FILE for locating files.
	* core-file.c (dwfl_core_file_report): New variables note_file and
	note_file_size, set them and pass them to dwfl_segment_report_module.
	* dwfl_segment_report_module.c: Include common.h and fcntl.h.
	(buf_has_data, buf_read_ulong, handle_file_note): New functions.
	(invalid_elf): New function from code of dwfl_segment_report_module.
	(dwfl_segment_report_module): Add parameters note_file and
	note_file_size.  New variables elf and fd, clean them up in finish.
	Move some code to invalid_elf.  Call handle_file_note, if it found
	a name verify the file by invalid_elf.  Protect elf and fd against
	cleanup by finish if we found the file for new Dwfl_Module.
	* libdwflP.h (dwfl_segment_report_module): Add parameters note_file and
	note_file_size.

tests/
2014-09-09  Jan Kratochvil  <[email protected]>

	Support NT_FILE for locating files.
	* Makefile.am (TESTS): Add run-linkmap-cut.sh.
	(EXTRA_DIST): Add run-linkmap-cut.sh, linkmap-cut-lib.so.bz2,
	linkmap-cut.bz2 and linkmap-cut.core.bz2 .
	* linkmap-cut-lib.so.bz2: New file.
	* linkmap-cut.bz2: New file.
	* linkmap-cut.core.bz2: New file.
	* run-linkmap-cut.sh: New file.
	* test-core.core.bz2: Disable its NT_FILE note.

Signed-off-by: Jan Kratochvil <[email protected]>
@xsuchy xsuchy added the bug label May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants