Project

General

Profile

Actions

Bug #17991

closed

[TEST, CRASH] TestBugReporter#test_bug_reporter_add

Added by tankf33der (Mike P) over 3 years ago. Updated over 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.0dev (2021-06-15T06:55:52Z master b32e6c168a) [x86_64-linux]
[ruby-core:104278]

Description

Testing host is latest Fedora Rawhide.
I see 4 tests which crashed by double free or corruption (out). This is one of them, rest 3 are TestRubyOptions#test_segv_* group.

[ 5452/20801] TestBugReporter#test_bug_reporter_add = 0.63 s
  1) Failure:
TestBugReporter#test_bug_reporter_add [/root/ruby/test/-ext-/bug_reporter/test_b                                                                                                                                                                                                                                             ug_reporter.rb:24]:
pid 45823 killed by SIGABRT (signal 6) (core dumped)
| -:1: [BUG] Segmentation fault at 0x000000000000b2ff
| ruby 3.1.0dev (2021-06-15T06:55:52Z master b32e6c168a) [x86_64-linux]
|
| -- Control frame information -----------------------------------------------
| c:0003 p:---- s:0012 e:000011 CFUNC  :kill
| c:0002 p:0021 s:0006 e:000005 EVAL   -:1 [FINISH]
| c:0001 p:0000 s:0003 E:0010e0 (none) [FINISH]
|
| -- Ruby level backtrace information ----------------------------------------
| -:1:in `<main>'
| -:1:in `kill'
|
| -- Machine register context ------------------------------------------------
|  RIP: 0x000014c14b8e758b RBP: 0x000000000000000b RSP: 0x00007ffe9e0c1358
|  RAX: 0x0000000000000000 RBX: 0x0000000000000001 RCX: 0x000014c14b8e758b
|  RDX: 0x000000000000b2ff RDI: 0x000000000000b2ff RSI: 0x000000000000000b
|   R8: 0x000000000000b2ff  R9: 0x00000000ffffffff R10: 0x000014c14b8b4f98
|  R11: 0x0000000000000202 R12: 0x0000000000000002 R13: 0x000014c14b7a7048
|  R14: 0x000000000000b2ff R15: 0x0000000000000001 EFL: 0x0000000000000202
|
| -- C level backtrace information -------------------------------------------
| /root/ruby/libruby.so.3.1.0(0x14c14bfa2ef9) [0x14c14bfa2ef9]
| [0x14c14bda83e0]
| [0x14c14bef9e39]
| [0x14c14bcc04b0]
| [0x14c14b8e758b]
| [0x14c14befaf89]
| [0x14c14bf795a7]
| [0x14c14bf843de]
| [0x14c14bf87256]
| [0x14c14bf8c58a]
| [0x14c14bdacf76]
| [0x14c14bdb2fd6]
| /root/ruby/ruby(main+0x6f) [0x40112f]
| double free or corruption (out)
.

1. [2/2] Assertion for "stderr"
   | Expected /Sample bug reporter: 12345/
   | to match
   |   "-- Control frame information -------------------------------------------                                                                                                                                                                                                                                             ----\n"+
   |   "c:0003 p:---- s:0012 e:000011 CFUNC  :kill\n"+
   |   "c:0002 p:0021 s:0006 e:000005 EVAL   -:1 [FINISH]\n"+
   |   "c:0001 p:0000 s:0003 E:0010e0 (none) [FINISH]\n\n"+
   |   "-- Ruby level backtrace information ------------------------------------                                                                                                                                                                                                                                             ----\n"+
   |   "-:1:in `<main>'\n"+
   |   "-:1:in `kill'\n\n"+
   |   "-- Machine register context --------------------------------------------                                                                                                                                                                                                                                             ----\n"+
   |   " RIP: 0x000014c14b8e758b RBP: 0x000000000000000b RSP: 0x00007ffe9e0c1358                                                                                                                                                                                                                                             \n"+
   |   " RAX: 0x0000000000000000 RBX: 0x0000000000000001 RCX: 0x000014c14b8e758b                                                                                                                                                                                                                                             \n"+
   |   " RDX: 0x000000000000b2ff RDI: 0x000000000000b2ff RSI: 0x000000000000000b                                                                                                                                                                                                                                             \n"+
   |   "  R8: 0x000000000000b2ff  R9: 0x00000000ffffffff R10: 0x000014c14b8b4f98                                                                                                                                                                                                                                             \n"+
   |   " R11: 0x0000000000000202 R12: 0x0000000000000002 R13: 0x000014c14b7a7048                                                                                                                                                                                                                                             \n"+
   |   " R14: 0x000000000000b2ff R15: 0x0000000000000001 EFL: 0x0000000000000202                                                                                                                                                                                                                                             \n\n"+
   |   "-- C level backtrace information ---------------------------------------                                                                                                                                                                                                                                             ----\n"+
   |   "/root/ruby/libruby.so.3.1.0(0x14c14bfa2ef9) [0x14c14bfa2ef9]\n"+
   |   "[0x14c14bda83e0]\n"+
   |   "[0x14c14bef9e39]\n"+
   |   "[0x14c14bcc04b0]\n"+
   |   "[0x14c14b8e758b]\n"+
   |   "[0x14c14befaf89]\n"+
   |   "[0x14c14bf795a7]\n"+
   |   "[0x14c14bf843de]\n"+
   |   "[0x14c14bf87256]\n"+
   |   "[0x14c14bf8c58a]\n"+
   |   "[0x14c14bdacf76]\n"+
   |   "[0x14c14bdb2fd6]\n"+
   |   "/root/ruby/ruby(main+0x6f) [0x40112f]\n"+
   |   "double free or corruption (out)\n"
   | after 4 patterns with 123 characters.

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #17794: addr2line.c can free(3) an invalid pointer without zlibClosedActions

Updated by xtkoba (Tee KOBAYASHI) over 3 years ago

This reminds me of #17794. Could you try the patch in #17794 (https://bugs.ruby-lang.org/attachments/8822) and see if the situation changes?

Updated by tankf33der (Mike P) over 3 years ago

Current summary:

all gcc below:
fedora-rawhide 11.1.1 - crash
archlinux 11.1.0 - ok
voidlinux 10.2.1 - ok
alpinelinux 10.2.1 - ok
solaris11 10.2.0 - ok 

all clang below:
fedora-rawhide 12.0.1 - ok

I will test the patch asap.

Updated by tankf33der (Mike P) over 3 years ago

Patch for add2line somehow helped:

fedora-rawhide gcc 11.1.1 now ok
voidlinux 10.2.1 still ok

4 crashes are gone.

Actions #4

Updated by jeremyevans0 (Jeremy Evans) over 3 years ago

  • Related to Bug #17794: addr2line.c can free(3) an invalid pointer without zlib added
Actions #5

Updated by jeremyevans0 (Jeremy Evans) over 3 years ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0