Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 644462 - app-misc/mc-4.8.20-r1: test failures (utilunix__my_system_fork_fail, utilunix__my_system_fork_child_shell, utilunix__my_system_fork_child)
Summary: app-misc/mc-4.8.20-r1: test failures (utilunix__my_system_fork_fail, utilunix...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sergei Trofimovich (RETIRED)
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2018-01-13 14:42 UTC by Rolf Eike Beer
Modified: 2019-02-16 23:33 UTC (History)
4 users (show)

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


Attachments
build.log (build.log,660.22 KB, text/x-log)
2018-01-13 14:42 UTC, Rolf Eike Beer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rolf Eike Beer archtester 2018-01-13 14:42:34 UTC
Created attachment 514640 [details]
build.log

====================================
   /lib: tests/lib/test-suite.log
====================================

# TOTAL: 8
# PASS:  5
# SKIP:  0
# XFAIL: 0
# FAIL:  3
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: utilunix__my_system_fork_fail
===================================

Running suite(s): /lib/utilunix
FAIL utilunix__my_system_fork_fail (exit status: 139)

FAIL: utilunix__my_system_fork_child_shell
==========================================

Running suite(s): /lib/utilunix
FAIL utilunix__my_system_fork_child_shell (exit status: 139)

FAIL: utilunix__my_system_fork_child
====================================

Running suite(s): /lib/utilunix
FAIL utilunix__my_system_fork_child (exit status: 139)
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2018-01-13 19:38:39 UTC
Last time I looked at it mc's tests were overriding libc's fork() assuming check library does not use it. Some check versions to use it and mess test up.

Which version of dev-libs/check you had installed?
Comment 2 Rolf Eike Beer archtester 2018-01-14 09:31:32 UTC
[IP-] [  ] dev-libs/check-0.10.0-r1:0
Comment 3 Rolf Eike Beer archtester 2018-01-21 09:38:14 UTC
hppa fails the same.
Comment 4 Rolf Eike Beer archtester 2019-02-08 15:36:15 UTC
Still happens with 4.8.22 and dev-libs/check-0.12.0.
Comment 5 Thomas Deutschmann (RETIRED) gentoo-dev 2019-02-09 17:03:32 UTC
I hit this on x86, too:

../../config/test-driver: line 107: 28038 Segmentation fault      (core dumped) "$@" > $log_file 2>&1
FAIL: utilunix__my_system_fork_fail
../../config/test-driver: line 107: 28051 Segmentation fault      (core dumped) "$@" > $log_file 2>&1
FAIL: utilunix__my_system_fork_child_shell
../../config/test-driver: line 107: 28067 Segmentation fault      (core dumped) "$@" > $log_file 2>&1
FAIL: utilunix__my_system_fork_child




# gdb /var/tmp/portage/app-misc/mc-4.8.22/work/mc-4.8.22/lib/.libs/utilunix.o /var/tmp/
coredumps/utilunix__my_sy.19233.1549731607
GNU gdb (Gentoo 8.1 p1) 8.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /var/tmp/portage/app-misc/mc-4.8.22/work/mc-4.8.22/lib/.libs/utilunix.o...done.

warning: core file may not match specified executable file.
[New LWP 19233]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
Core was generated by `./utilunix__my_system_fork_fail'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xb7fac82d in check_match (undef_name=undef_name@entry=0xb7f55f7c "fork", ref=ref@entry=0xb7f55684,
    version=version@entry=0xb7f7ff40, flags=flags@entry=1, type_class=type_class@entry=1, sym=sym@entry=0x48c778,
    symidx=symidx@entry=342, strtab=strtab@entry=0x48c798 <error: Cannot access memory at address 0x48c798>,
    map=map@entry=0xb7fc9900, versioned_sym=versioned_sym@entry=0xbfd684f4, num_versions=num_versions@entry=0xbfd684f0)
    at dl-lookup.c:120
120     dl-lookup.c: No such file or directory.
(gdb) bt
#0  0xb7fac82d in check_match (undef_name=undef_name@entry=0xb7f55f7c "fork", ref=ref@entry=0xb7f55684,
    version=version@entry=0xb7f7ff40, flags=flags@entry=1, type_class=type_class@entry=1, sym=sym@entry=0x48c778,
    symidx=symidx@entry=342, strtab=strtab@entry=0x48c798 <error: Cannot access memory at address 0x48c798>,
    map=map@entry=0xb7fc9900, versioned_sym=versioned_sym@entry=0xbfd684f4, num_versions=num_versions@entry=0xbfd684f0)
    at dl-lookup.c:120
#1  0xb7facc4e in do_lookup_x (undef_name=undef_name@entry=0xb7f55f7c "fork", new_hash=new_hash@entry=2090263927,
    old_hash=old_hash@entry=0xbfd68584, ref=0xb7f55684, result=result@entry=0xbfd6858c, scope=0xb7fc9a5c,
    i=<optimized out>, version=version@entry=0xb7f7ff40, flags=flags@entry=1, skip=skip@entry=0x0 <i_cache_add>,
    type_class=type_class@entry=1, undef_map=undef_map@entry=0xb7f7e2c0) at dl-lookup.c:406
#2  0xb7fad5af in _dl_lookup_symbol_x (undef_name=undef_name@entry=0xb7f55f7c "fork", undef_map=0xb7f7e2c0,
    ref=ref@entry=0xbfd68604, symbol_scope=0xb7f7e478, version=0xb7f7ff40, type_class=type_class@entry=1,
    flags=flags@entry=1, skip_map=skip_map@entry=0x0 <i_cache_add>) at dl-lookup.c:813
#3  0xb7fb2b7a in _dl_fixup (l=<optimized out>, reloc_arg=<optimized out>) at dl-runtime.c:112
#4  0xb7fb8b50 in _dl_runtime_resolve () at ../sysdeps/i386/dl-trampoline.S:43
#5  0xb7f5a8ec in tcase_run_tfun_fork (i=0, tfun=0x569200, tc=0x566bd0, sr=0x569220)
    at /var/tmp/portage/dev-libs/check-0.12.0/work/check-0.12.0/src/check_run.c:484
#6  srunner_iterate_tcase_tfuns (tc=<optimized out>, sr=<optimized out>)
    at /var/tmp/portage/dev-libs/check-0.12.0/work/check-0.12.0/src/check_run.c:252
#7  srunner_run_tcase (tc=<optimized out>, sr=<optimized out>)
    at /var/tmp/portage/dev-libs/check-0.12.0/work/check-0.12.0/src/check_run.c:401
#8  srunner_iterate_suites (print_mode=<optimized out>, exclude_tags=<optimized out>, include_tags=<optimized out>,
    tcname=<optimized out>, sname=<optimized out>, sr=<optimized out>)
    at /var/tmp/portage/dev-libs/check-0.12.0/work/check-0.12.0/src/check_run.c:218
#9  srunner_run_tagged (sr=<optimized out>, sr@entry=0x569220, sname=<optimized out>, sname@entry=0x0 <i_cache_add>,
    tcname=<optimized out>, tcname@entry=0x0 <i_cache_add>, include_tags=<optimized out>,
    include_tags@entry=0x0 <i_cache_add>, exclude_tags=<optimized out>, exclude_tags@entry=0x0 <i_cache_add>,
    print_mode=<optimized out>, print_mode@entry=CK_ENV)
    at /var/tmp/portage/dev-libs/check-0.12.0/work/check-0.12.0/src/check_run.c:811
#10 0xb7f5afb5 in srunner_run (sr=sr@entry=0x569220, sname=sname@entry=0x0 <i_cache_add>,
    tcname=tcname@entry=0x0 <i_cache_add>, print_mode=print_mode@entry=CK_ENV)
    at /var/tmp/portage/dev-libs/check-0.12.0/work/check-0.12.0/src/check_run.c:824
#11 0xb7f5afed in srunner_run_all (sr=0x569220, print_mode=CK_ENV)
    at /var/tmp/portage/dev-libs/check-0.12.0/work/check-0.12.0/src/check_run.c:763
#12 0x004921f7 in ?? ()
#13 0x00569220 in ?? ()
#14 0xb7ab4f47 in __libc_start_main (main=0x492130, argc=1, argv=0xbfd68834, init=0x4bc0f9, fini=0x4bc158,
    rtld_fini=0xb7fb35aa <_dl_fini>, stack_end=0xbfd6882c) at ../csu/libc-start.c:308
#15 0x00492249 in ?? ()
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-16 21:49:00 UTC
(In reply to Thomas Deutschmann from comment #5)
> I hit this on x86, too:
> 
> ../../config/test-driver: line 107: 28038 Segmentation fault      (core
> dumped) "$@" > $log_file 2>&1

If you still can reproduce it on your system (I cant :[).
Can you check if the following workaround works:
    CK_FORK=no FEATURES=test USE=test emerge -v1 app-misc/mc
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2019-02-16 22:06:48 UTC
Passing tests with CK_FORK=no.
Comment 8 Larry the Git Cow gentoo-dev 2019-02-16 23:31:53 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa50c6ff949245f25249b76afba190a00a5e1641

commit fa50c6ff949245f25249b76afba190a00a5e1641
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-02-16 23:31:34 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-02-16 23:31:45 +0000

    app-misc/mc: disable forking in testsuite, bug #644462
    
    A few mc tests validate 'fork' functionality by mocking
    out fork(). check uses fork() by default as a way to
    isolate testsiute. This causes conflict.
    
    To resove conflict we disable forking in check via
    CK_FORK=no environment variable.
    
    Reported-by: Rolf Eike Beer
    Closes: https://bugs.gentoo.org/644462
    Package-Manager: Portage-2.3.60, Repoman-2.3.12
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 app-misc/mc/mc-4.8.22.ebuild | 9 +++++++++
 app-misc/mc/mc-9999.ebuild   | 8 ++++++++
 2 files changed, 17 insertions(+)
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-16 23:33:06 UTC
(In reply to Thomas Deutschmann from comment #7)
> Passing tests with CK_FORK=no.

Thank you! Added a workaround to latest ebuilds.