Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002025Core InformReleasing, bibliographic data, cBlorbpublic2017-08-11 02:272019-10-18 19:22
Assigned To 
Platformx86OSLinuxOS VersionAny
Product Version6M62 
Target VersionFixed in Version 
Summary0002025: ni crashes trying to get time of day on latest Linux kernels
DescriptionThe ni story compiler for Linux is a statically-linked Linux binary. The 6M62 binary is linked against an older version of glibc that implements the gettimeofday() syscall using the vsyscall mechanism. In the latest Linux kernels, the vsyscall mechanism has been disabled by default for security reasons. As a result, ni will crash right at startup when invoked in any way.
Minimal Source Text To Reproduce
Run ni on a Linux box with kernel 4.11.
Additional InformationThe category of this bug report is obviously wrong. I didn't see an appropriate option.

The 6L38 binary is linked against an even older version of glibc, and thus works fine.

A workaround for the 6M62 crash is to set vsyscall=emulate kernel option. This has mild security implications, but makes ni work again (tested).

Easiest real fix is to recompile ni with a current glibc.

(If ni were open-sourced that would be ideal, of course.)

Is there some reason ni is stripped? Not doing so would make debugging this kind of thing easier.
TagsNo tags attached.
Effect(critical) Compiler crashes
Attached Files

- Relationships
has duplicate 0002030closed Gnome Inform application NI segfaults on every invocation 

-  Notes
neroden (reporter)
2017-09-28 22:24

I just ran into this myself. This is extremely high priority. I can't believe this has been left to fester for nearly two months; it shows callous disregard for the userbase by the ni authors.
curiousdannii (developer)
2017-10-04 03:59

@pchimento Do you have the ability to recompile this, or does it need Graham?
pchimento (developer)
2017-10-06 14:04

I have a recompiled ni binary for x86_64 available here: [^]

This should allow people to fix their installations for the time being. Replace the existing ni binary in /usr/libexec/gnome-inform7 (location may vary per Linux distribution) with this one. Or, build gnome-inform7 from a git checkout after dropping this ni binary into the src/ni/ folder.

Hopefully there will be a re-release of ni on all supported architectures before too long; I can only provide x86_64, lacking the hardware to provide the others. When that happens, I'll issue a full re-release of gnome-inform7.

It comes with a few caveats.

- One test from Inform's test suite failed with this recompiled binary. No idea how serious it is. I'm leaving on vacation imminently, so I really don't have time to dig into it. Obviously before making a re-release we'd have to make sure this isn't an issue.

- If anyone decides to make a re-release of one of the gnome-inform7 packages with this binary (see [^]) please differentiate it by including something like "unofficial" in the version string.

PS. Neroden: that's not helpful and not likely to make others want to help you.
neroden (reporter)
2017-10-10 20:05

Philip, which architectures are in fact supported? Is it just x86_64, i386, ppc32, and arm6 w/hardfloat?

I have a fair amount of practice in cross-compiling; I restructured the configure scripts for gcc a few years ago, which involved extensive cross-compile testing. I could even test that the binary runs on i386, though I don't have hardware or simulators to test the others.
adam (reporter)
2017-10-13 18:43

A rebuilt all-architectures is at [^]

ppc32 is still the original one--I destroyed my ppc32 system trying to get it to current Debian stable. The other three architectures have been rebuilt and the test suite run; x86 and x86_64 each fail one test case where the exponential function returns 0.999999 rather than 1.0. I figure if you're trying to do precision floating point in Inform 7 you have worse problems than one part per million.

Once I figure out again how to upload to the I7 site (or Philip or someone does it for me) it will be available from the Inform7 site.

Those are currently the only architectures available as they're the only ones I have ready access to.
PO8 (reporter)
2017-10-21 18:58

adam: Your build still tries to call vsyscall for time of day. Not sure why. Can confirm that yours crashes unless I have vsyscall=emulate on my Linux box.
PO8 (reporter)
2017-10-21 19:07

pchimento: Your binary seems to be compiled correctly to avoid vsyscall . Thanks much.
adam (reporter)
2017-10-21 19:50

Well, that's annoying. That's been compiled on Debian Stretch, fully updated on the 13th of October 2017.

I can try compiling on something like the current Ubuntu but it may take a little while.
PO8 (reporter)
2017-10-21 21:25

adam: It's about both kernel version and glibc version. What ones do you have of these? I'm looking at Linux 4.13.0-1 and libc6 2.24-17 . Maybe the static linking is grabbing an older libc.a or something? I don't know.
Marc (reporter)
2018-04-06 12:20

Is there any plan on making a new release which contains a fix for this issue?
adam (reporter)
2018-04-06 13:32

I can try again on ARM and x86_64. My last i386 machine died a few months ago.
Marc (reporter)
2018-05-28 05:11

adam: any luck? pchimento's binary seems to work fine on Windows Linux Subsystem.
adam (reporter)
2018-05-28 22:32

I have rebuilt for amd64 and it seems to work OK on the two most recent Amazon AMIs, which is somewhat promising. I am in the midst of building (very slowly) on a Raspberry Pi.

I may have enough bits and pieces to build an i386 machine, but I won't have that rebuilt for a while. I'll ask how to re-upload the image.
adam (reporter)
2018-05-29 17:10

Here's something interesting. I was able to do an i386 build on sorta-kinda Ubuntu 18.04, (an Ubuntu 16.04 updated _in situ_ from Xubuntu 18.04 mini iso), and got the immediate segfault and backtrace with nothing helpful other than vsyscall().

However, if you drop the "k" from the Inform 6 compilation options, it gets through the build. So I think it's got something to do with generating the gameinfo.dbg file.

Even before I manage to get the new images uploaded, you can easily test this out by changing line 522 of the "i7" Perl script from:

    my $i6opts = "-kE2w";


    my $i6opts = "-E2w";

I don't know what deleterious effects not using -k would have, or if this is anything other than my own systems' strangeness, but it might be worth a try.

In the version I am planning on uploading, I've added some logic to detect i686 and drop the "k" if found. I don't know if it's actually a reasonable workaround, but at least it isn't any more broken.

kernel is 4.15.0-22-generic #24 Ubuntu SMP, ldd is Ubuntu GLIBC 2.27-3ubuntu1 .
zarf (developer)
2018-05-29 18:39

It's the Inform 6 binary that's crashing? People should be able to rebuild that from source for themselves if necessary.
adam (reporter)
2018-05-29 18:45

Well, it is for me, now. But I wasn't even seeing the crash previously. So clearly it's very dependent on particular kernel and glibc versions.
adam (reporter)
2018-06-09 17:19

New I7_6M62_Linux_all.tar.gz is uploaded to the inform7 site. Here's hoping it works for other people as well.
PO8 (reporter)
2019-10-17 23:57

This version of `ni` works for me. But the other Linux packages on the Inform7 site haven't been updated: I had to put the Compiler binaries in place manually.

Any chance of getting rebuilt Debian, Ubuntu, etc packages there? I'd like to give my students an assignment involving Inform 7, but it will be harder if I have to include instructions about how to patch up the install.
pchimento (developer)
2019-10-18 19:22

Sorry, at the moment I can't rebuild the packages because I'm still working on 0001997... No modern version of Debian or Ubuntu has the necessary outdated dependencies, so I need to update those first.

However, in the meantime, a contributor has packaged the app with all its dependencies included on Flathub, with easy setup instructions: [^]
This way of installing it might be suitable for installation instructions for your students.

- Issue History
Date Modified Username Field Change
2017-08-11 02:27 PO8 New Issue
2017-08-15 22:46 PO8 Issue Monitored: PO8
2017-09-28 22:24 neroden Note Added: 0004723
2017-09-29 11:47 zarf Relationship added has duplicate 0002030
2017-10-04 03:59 curiousdannii Note Added: 0004727
2017-10-04 04:00 curiousdannii Status new => confirmed
2017-10-06 14:04 pchimento Note Added: 0004728
2017-10-10 20:05 neroden Note Added: 0004731
2017-10-13 18:43 adam Note Added: 0004735
2017-10-21 18:58 PO8 Note Added: 0004740
2017-10-21 19:07 PO8 Note Added: 0004741
2017-10-21 19:50 adam Note Added: 0004742
2017-10-21 21:25 PO8 Note Added: 0004743
2018-04-06 12:20 Marc Note Added: 0004770
2018-04-06 13:32 adam Note Added: 0004771
2018-05-28 05:11 Marc Note Added: 0004775
2018-05-28 22:32 adam Note Added: 0004778
2018-05-29 17:10 adam Note Added: 0004779
2018-05-29 18:39 zarf Note Added: 0004780
2018-05-29 18:45 adam Note Added: 0004781
2018-06-09 17:19 adam Note Added: 0004782
2019-10-17 23:57 PO8 Note Added: 0004883
2019-10-18 19:22 pchimento Note Added: 0004884

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker