Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 595714 - sys-apps/openrc-0.22 - Aborted (core dumped) - *** Error in `/sbin/openrc-run': free(): invalid pointer: 0x00007ffff75b8bd8 ***
Summary: sys-apps/openrc-0.22 - Aborted (core dumped) - *** Error in `/sbin/openrc-run...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-30 20:03 UTC by Thomas Deutschmann (RETIRED)
Modified: 2016-10-01 01:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2016-09-30 20:03:34 UTC
With =sys-apps/openrc-0.22 when calling "/etc/init.d/<any service> needsme" (or "ineed", "iuse"...) openrc-run crashes:

vm-gentoo-x64 ~ # /etc/init.d/sysctl needsme

*** Error in `/sbin/openrc-run': free(): invalid pointer: 0x00007fd2556adbd8 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x6fe8c)[0x7fd255383e8c]
/lib64/libc.so.6(+0x759b6)[0x7fd2553899b6]
/lib64/libc.so.6(+0x761ae)[0x7fd25538a1ae]
/lib64/librc.so.1(rc_stringlist_free+0x24)[0x7fd255ac6df4]
/sbin/openrc-run[0x404f8e]
/lib64/libc.so.6(+0x35bf8)[0x7fd255349bf8]
/lib64/libc.so.6(+0x35c45)[0x7fd255349c45]
/lib64/libc.so.6(__libc_start_main+0xf7)[0x7fd2553347b7]
/sbin/openrc-run[0x404cc9]
======= Memory map: ========
00400000-00409000 r-xp 00000000 fe:02 209388                             /sbin/openrc-run
00609000-0060a000 r--p 00009000 fe:02 209388                             /sbin/openrc-run
0060a000-0060b000 rw-p 0000a000 fe:02 209388                             /sbin/openrc-run
013d9000-0141b000 rw-p 00000000 00:00 0                                  [heap]
7fd250000000-7fd250021000 rw-p 00000000 00:00 0
7fd250021000-7fd254000000 ---p 00000000 00:00 0
7fd254ea1000-7fd254eb7000 r-xp 00000000 fe:02 639261                     /usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_s.so.1
7fd254eb7000-7fd2550b6000 ---p 00016000 fe:02 639261                     /usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_s.so.1
7fd2550b6000-7fd2550b7000 r--p 00015000 fe:02 639261                     /usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_s.so.1
7fd2550b7000-7fd2550b8000 rw-p 00016000 fe:02 639261                     /usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_s.so.1
7fd2550b8000-7fd25510f000 r-xp 00000000 fe:02 198377                     /lib64/libncurses.so.6.0
7fd25510f000-7fd25530e000 ---p 00057000 fe:02 198377                     /lib64/libncurses.so.6.0
7fd25530e000-7fd255312000 r--p 00056000 fe:02 198377                     /lib64/libncurses.so.6.0
7fd255312000-7fd255313000 rw-p 0005a000 fe:02 198377                     /lib64/libncurses.so.6.0
7fd255313000-7fd255314000 rw-p 00000000 00:00 0
7fd255314000-7fd2554a9000 r-xp 00000000 fe:02 294368                     /lib64/libc-2.23.so
7fd2554a9000-7fd2556a9000 ---p 00195000 fe:02 294368                     /lib64/libc-2.23.so
7fd2556a9000-7fd2556ad000 r--p 00195000 fe:02 294368                     /lib64/libc-2.23.so
7fd2556ad000-7fd2556af000 rw-p 00199000 fe:02 294368                     /lib64/libc-2.23.so
7fd2556af000-7fd2556b3000 rw-p 00000000 00:00 0
7fd2556b3000-7fd2556b5000 r-xp 00000000 fe:02 292875                     /lib64/libdl-2.23.so
7fd2556b5000-7fd2558b5000 ---p 00002000 fe:02 292875                     /lib64/libdl-2.23.so
7fd2558b5000-7fd2558b6000 r--p 00002000 fe:02 292875                     /lib64/libdl-2.23.so
7fd2558b6000-7fd2558b7000 rw-p 00003000 fe:02 292875                     /lib64/libdl-2.23.so
7fd2558b7000-7fd2558bc000 r-xp 00000000 fe:02 209386                     /lib64/libeinfo.so.1
7fd2558bc000-7fd255abb000 ---p 00005000 fe:02 209386                     /lib64/libeinfo.so.1
7fd255abb000-7fd255abc000 r--p 00004000 fe:02 209386                     /lib64/libeinfo.so.1
7fd255abc000-7fd255abd000 rw-p 00005000 fe:02 209386                     /lib64/libeinfo.so.1
7fd255abd000-7fd255ac9000 r-xp 00000000 fe:02 209389                     /lib64/librc.so.1
7fd255ac9000-7fd255cc9000 ---p 0000c000 fe:02 209389                     /lib64/librc.so.1
7fd255cc9000-7fd255cca000 r--p 0000c000 fe:02 209389                     /lib64/librc.so.1
7fd255cca000-7fd255ccb000 rw-p 0000d000 fe:02 209389                     /lib64/librc.so.1
7fd255ccb000-7fd255ccd000 r-xp 00000000 fe:02 292879                     /lib64/libutil-2.23.so
7fd255ccd000-7fd255ecc000 ---p 00002000 fe:02 292879                     /lib64/libutil-2.23.so
7fd255ecc000-7fd255ecd000 r--p 00001000 fe:02 292879                     /lib64/libutil-2.23.so
7fd255ecd000-7fd255ece000 rw-p 00002000 fe:02 292879                     /lib64/libutil-2.23.so
7fd255ece000-7fd255ef1000 r-xp 00000000 fe:02 294269                     /lib64/ld-2.23.so
7fd2560d1000-7fd2560d5000 rw-p 00000000 00:00 0
7fd2560ee000-7fd2560f1000 rw-p 00000000 00:00 0
7fd2560f1000-7fd2560f2000 r--p 00023000 fe:02 294269                     /lib64/ld-2.23.so
7fd2560f2000-7fd2560f3000 rw-p 00024000 fe:02 294269                     /lib64/ld-2.23.so
7fd2560f3000-7fd2560f4000 rw-p 00000000 00:00 0
7ffe4551b000-7ffe4553c000 rw-p 00000000 00:00 0                          [stack]
7ffe455ed000-7ffe455ef000 r--p 00000000 00:00 0                          [vvar]
7ffe455ef000-7ffe455f1000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)


(gdb) backtrace
#0  0x00007ffff7252268 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff72536ba in __GI_abort () at abort.c:89
#2  0x00007ffff728ee91 in __libc_message (do_abort=do_abort@entry=2,
    fmt=fmt@entry=0x7ffff7387b00 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff72949b6 in malloc_printerr (action=3, str=0x7ffff7384909 "free(): invalid pointer",
    ptr=<optimized out>, ar_ptr=<optimized out>) at malloc.c:5007
#4  0x00007ffff72951ae in _int_free (av=0x7ffff75b8b40 <main_arena>, p=<optimized out>, have_lock=0) at malloc.c:3868
#5  0x00007ffff79d1df4 in __RC_rc_stringlist_free (list=0x60e5d0) at librc-stringlist.c:145
#6  0x0000000000404f8e in cleanup () at openrc-run.c:264
#7  0x00007ffff7254bf8 in __run_exit_handlers (status=0, listp=0x7ffff75b8618 <__exit_funcs>,
    run_list_atexit=run_list_atexit@entry=true) at exit.c:82
#8  0x00007ffff7254c45 in __GI_exit (status=<optimized out>) at exit.c:104
#9  0x00007ffff723f7b7 in __libc_start_main (main=0x403df0 <main>, argc=3, argv=0x7fffffffdf98, init=<optimized out>,
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdf88) at ../csu/libc-start.c:323
#10 0x0000000000404cc9 in _start ()



# emerge --info
Portage 2.3.1 (python 3.5.2-final-0, default/linux/amd64/13.0, gcc-5.4.0, glibc-2.23-r2, 4.7.5-gentoo x86_64)
=================================================================
System uname: Linux-4.7.5-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770K_CPU_@_3.50GHz-with-gentoo-2.3
KiB Mem:     4016048 total,   2096836 free
KiB Swap:    1048572 total,   1048572 free
Timestamp of repository gentoo: Fri, 30 Sep 2016 10:09:21 +0000
sh bash 4.4
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash:          4.4::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.0-r1::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo, 3.5.2::gentoo
dev-util/cmake:           3.6.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            5.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2016-09-30 20:56:34 UTC
Bisect:

$ git bisect log
git bisect start
# good: [fbfc14040a62d99261971a6f094b5b8f63b5a990] update ChangeLog
git bisect good fbfc14040a62d99261971a6f094b5b8f63b5a990
# bad: [b71bcc242202752bc74fce3a5c629f172b04fca5] update ChangeLog
git bisect bad b71bcc242202752bc74fce3a5c629f172b04fca5
# good: [5bfb7d6c77ff533e34e2bbfe5b6e57410d961d70] Update ChangeLog
git bisect good 5bfb7d6c77ff533e34e2bbfe5b6e57410d961d70
# bad: [353bb9bc9a0ab3c6650d72d2ceb14c990762a2a0] init.d/hostname: add support for /etc/hostname
git bisect bad 353bb9bc9a0ab3c6650d72d2ceb14c990762a2a0
# skip: [daf93977641201f16c477b075ce9055a1da8f7b3] init.d: combine sysctl scripts
git bisect skip daf93977641201f16c477b075ce9055a1da8f7b3
# skip: [b085b2cda58bc884acb959e48f14fb044c983042] etc: create default rc.conf
git bisect skip b085b2cda58bc884acb959e48f14fb044c983042
# good: [1b32af17225a4b18ced7f4326727cbe8265e7fd2] increment version to 0.22
git bisect good 1b32af17225a4b18ced7f4326727cbe8265e7fd2
# skip: [3092e310acd376fc626cc051549e02bcd7697aed] tmpfiles: Accept filenames as command line arguments
git bisect skip 3092e310acd376fc626cc051549e02bcd7697aed
# bad: [1a55d46645b376cd27f394796934150120a08387] local.d/README: typo fix
git bisect bad 1a55d46645b376cd27f394796934150120a08387
# good: [5af5d12f3e56f9f2ff232d124d27c856fd66f551] Fix PATH for Prefix.
git bisect good 5af5d12f3e56f9f2ff232d124d27c856fd66f551
# bad: [ca8c29ee60b0e8ca89091aaf801725bd71e28001] librc: fix Docker auto detection
git bisect bad ca8c29ee60b0e8ca89091aaf801725bd71e28001
# bad: [2984504c887afc9a36610eb7c20b097f7d1e70d0] conf.d: remove staticroute file fragments
git bisect bad 2984504c887afc9a36610eb7c20b097f7d1e70d0
# bad: [3a1262703fd20d2e8288d13d908fb282c77d1793] Remove the DEBUG_MEMORY macro
git bisect bad 3a1262703fd20d2e8288d13d908fb282c77d1793
# good: [8bca2cd4b3c710809131ac036456b34c223e8d12] Build: fix hardcoded pkg-config invocation
git bisect good 8bca2cd4b3c710809131ac036456b34c223e8d12
# good: [20035210bdf5d5729734457f35f5f32a53a5b3ad] make variable aflag a boolean show_all
git bisect good 20035210bdf5d5729734457f35f5f32a53a5b3ad
# first bad commit: [3a1262703fd20d2e8288d13d908fb282c77d1793] Remove the DEBUG_MEMORY macro

3a1262703fd20d2e8288d13d908fb282c77d1793 is the first bad commit
commit 3a1262703fd20d2e8288d13d908fb282c77d1793
Author: William Hubbs <w.d.hubbs@gmail.com>
Date:   Sun Mar 22 15:04:14 2015 -0500

    Remove the DEBUG_MEMORY macro

    This fixes #43.

:100644 100644 7fadd23125b1a30ec90461821a898654c1bdb375 edf64267923f85a1f7e5839f4024235bc5c254c2 M      README.md
:040000 040000 c8e232267a1409bbd1505463b7aa303dab066bbf 28011ae915efb3b5583f4f8e3a27b66e58441f98 M      src


https://github.com/OpenRC/openrc/commit/3a1262703fd20d2e8288d13d908fb282c77d1793
Comment 2 William Hubbs gentoo-dev 2016-10-01 01:28:14 UTC
https://github.com/openrc/openrc/commit/6710316

This will be in OpenRC-0.23 and OpenRC-0.22.1.