Bug 237459 - devel/lutok is partially broken on i386; causes failures (segfaults) with kyua tests
Summary: devel/lutok is partially broken on i386; causes failures (segfaults) with kyu...
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Some People
Assignee: Enji Cooper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-22 05:22 UTC by Enji Cooper
Modified: 2019-04-22 23:36 UTC (History)
1 user (show)

See Also:
ngie: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer 2019-04-22 05:22:48 UTC
The kyua tests currently fail on ^/stable/11 with i386 with SIGSEGV, like shown below.
From https://ci.freebsd.org/job/FreeBSD-stable-11-i386-test/lastCompletedBuild/testReport/local.kyua.engine/kyuafile_test/kyuafile__load__missing_test_program/ :

20190422-034812 D 56392 utils/env.cpp:114: Environment variable 'TMPDIR' is '/tmp/kyua.FvyhWW/3961/work'
Process with PID 56392 exited with signal 11 and dumped core; attempting to gather stack trace
(no debugging symbols found)...Core was generated by `/usr/tests/local/kyua/engine/kyuafile_test -vunprivileged-user=tests -r/tmp/kyua'.
Program terminated with signal 11, Segmentation fault.
(no debugging symbols found)...#0  0x2812a7f9 in lua_close () from /usr/local/lib/liblua-5.2.so
#0  0x2812a7f9 in lua_close () from /usr/local/lib/liblua-5.2.so
#1  0x2817404b in lutok::state::raw_state () from /usr/local/lib/liblutok.so.3
#2  0x2881c2c8 in ?? ()
#3  0xbfbfde58 in ?? ()
#4  0x2881c2c8 in ?? ()
#5  0x28818cb0 in ?? ()
#6  0x00000002 in ?? ()
#7  0x2810ae7c in list_global () from /libexec/ld-elf.so.1
#8  0x2885a000 in ?? ()
#9  0x080efc28 in typeinfo for std::__1::basic_ostream<char, std::__1::char_traits<char> > ()
#10 0x283c870c in .got () from /usr/lib/libc++.so.1
#11 0xbfbfde88 in ?? ()
#12 0x9aef3637 in ?? ()
#13 0x00000010 in ?? ()
#14 0x28818cb0 in ?? ()
#15 0x00000000 in ?? ()
GDB exited successfully
Files left in work directory after failure: config, kyua.LSY5EX, kyuafile_test.core, one

It seems that the issue with the tests is related to devel/lutok, not devel/atf or devel/kyua, based on the stack trace.

Given that hunch, I reproduced the issue on i386 with ^/stable/11 (so it's not a Jenkins issue). I then cloned lutok from master (https://github.com/jmmv/lutok), rebuilt it, and am no longer able to reproduce the issue.

The one commit that stands out that might have fixed the issue (because the rest of the changes were autotools/Travis CI related) is https://github.com/jmmv/lutok/commit/a23c7b894cf50dea5e927e36a3578b720fffcf23 .
Comment 1 commit-hook freebsd_committer 2019-04-22 23:35:09 UTC
A commit references this bug:

Author: ngie
Date: Mon Apr 22 23:34:13 UTC 2019
New revision: 499695
URL: https://svnweb.freebsd.org/changeset/ports/499695

Log:
  Backport patch to fix error check with access(3) failures

  The code was not properly checking the failure from access(3).

  Backport the patch from GitHub (made after the 0.4 release) which fixes this
  issue.

  Bump PORTREVISION for the change.

  PR:		237459
  Reviewed by:	asomers, jmmv
  Approved by:	jmmv (maintainer)
  Obtained from:	https://github.com/jmmv/lutok (a23c7b894cf50dea5e927e36a3578b720fffcf23)
  Differential Revision: https://reviews.freebsd.org/D20002

Changes:
  head/devel/lutok/Makefile
  head/devel/lutok/files/
  head/devel/lutok/files/patch-state.cpp