bug in linux version (intro puzzle 5-3)

Case number:845829-2001691
Topic:Crash/Hang
Opened by:siriusjbw
Status:Open
Type:Bug
Opened on:Wednesday, December 23, 2015 - 14:38
Last modified:Saturday, September 16, 2017 - 18:21

The linux version always crashes when I am doing intro puzzle 5-3, and I select "wiggle all".

(Wed, 12/23/2015 - 14:38  |  22 comments)


Qfast's picture
User offline. Last seen 2 years 17 weeks ago. Offline
Joined: 03/13/2016
Groups: Go Science

I have the same problem. Console output after crash:

terminate called after throwing an instance of 'std::bad_alloc'
terminate called recursively
what(): std::bad_alloc
Aborted

jflat06's picture
User offline. Last seen 3 hours 33 min ago. Offline
Joined: 09/29/2010
Groups: Window Group

I am not getting this crash on my local client.

Which distribution are you using?

Does it happen immediately upon opening the puzzle and pressing wiggle? Or are you doing anything else before pressing wiggle?

jeff101's picture
User offline. Last seen 2 days 14 hours ago. Offline
Joined: 04/20/2012
Groups: Go Science

jflat06, I am curious what distribution of Linux you used above.
Do Tutorial 5-3 and other ED puzzles still not crash on your Linux machine?
What is so special about your system that the crashes don't occur on it?

jflat06's picture
User offline. Last seen 3 hours 33 min ago. Offline
Joined: 09/29/2010
Groups: Window Group

Interesting - I am now getting this crash. I was (and still am) on Ubuntu 14.04.

I'm not sure why it wasn't crashing before. A curious note is that it doesn't crash on my development build - it's possible that I had mistakenly tested for the crash on my build instead of the deployed game client.

So I can repro it now. The next trick will be repro'ing it in a development environment so that I can get some useful debug info.

Joined: 12/22/2015
Groups: None

I am using Ubuntu, and I'm not doing anything else before I wiggle all.

Qfast's picture
User offline. Last seen 2 years 17 weeks ago. Offline
Joined: 03/13/2016
Groups: Go Science

Ubuntu 12.04. Crashes all puzzles with Electron Density.

Joined: 05/25/2016
Groups: None

I have Ubuntu 16.04. Same issue, crash whenever I use wiggle or shake (It has also happened just from moving the structure with the mouse). Aside from crashing in the electron density puzzle the issue also appears in some of the other tutorial puzzles, such as the ligand constraints one.

jeff101's picture
User offline. Last seen 2 days 14 hours ago. Offline
Joined: 04/20/2012
Groups: Go Science

A player said today in Global Chat that "foldit keeps crashing on the 5-3 Electron Density on Linux".

https://fold.it/portal/node/995351#comment-31777 is also about 5-3 crashing in Linux.

https://fold.it/portal/node/2001282 is about 5-3 crashing in other operating systems.

charli9's picture
User offline. Last seen 3 years 1 week ago. Offline
Joined: 10/09/2016
Groups: Go Science

How to reproduce:

  • Start level 5-3 (Electron Density) in Online Mode.
  • Press Wiggle All

--- Investigation

Running strace on the program reveals the following actions after pressing Wiggle All:

clone(child_stack=0x7f6871becb70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f6871bed590, tls=0x7f6871bed2c0, child_tidptr=0x7f6871bed590) = 12894
mmap(NULL, 140086330449920, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
mmap(NULL, 140086330585088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
mmap(NULL, 134217728, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x7f6844000000
munmap(0x7f6848000000, 67108864)        = 0
mprotect(0x7f6844000000, 135168, PROT_READ|PROT_WRITE) = 0
mmap(NULL, 140086330449920, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)

This would suggest that I don't have enough available memory, even though I can guarantee that that is not the case.

The first lines of strace said:

strace: Process 12934 attached
strace: [ Process PID=12934 runs in x32 mode. ]
strace: [ Process PID=12934 runs in 64 bit mode. ]

I'm not sure if this program indeed runs at x32, which could explain the memory issue.

--- Digging deeper into the memory issue

Running a loop counting the memory usage of Foldit:

while true; do cat /proc/`pidof Foldit`/status | grep VmSize >> memusage; done

then running uniq memusage gives the following result:

[...]
VmSize:	  882128 kB
VmSize:	  882640 kB
VmSize:	  888888 kB
-- Here I executed Shuffle All --
VmSize:	  954424 kB
VmSize:	 1019960 kB

So it looks like the program crashes after using ~1GB of memory. Before pressing wiggle all, I had 4G of memory free, so that shouldn't be a problem.

Running any of the previous levels gives a maximum memory usage of ~900MB.

If you need any more information, please let me know, so I can help!

Joined: 04/12/2017
Groups: None

I have the same issue with the same tutorial (electron cloud) with Ubuntu 14.04.5 LTS 64bit

various memory corruption errors cause it to crash
*** Error in `./Foldit': double free or corruption (fasttop): 0x00007fa99c25b470 ***
Aborted (core dumped)

I also got

terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
terminate called recursively
Aborted (core dumped)

It happens when trying to fix the protein, either by wriggling or by shaking, and once even just by manually dragging the loose sheet near where it belongs.

jeff101's picture
User offline. Last seen 2 days 14 hours ago. Offline
Joined: 04/20/2012
Groups: Go Science

http://fold.it/portal/node/2003635 is also about 5-3 crashing in Linux.

Are there any Linux users who have gotten around this problem?
Have you been able to play any Foldit Electron Density puzzles?
How did you get around these crashes?

Please help!
Thanks,
Jeff

Joined: 09/20/2010
Groups: Go Science

Jeff,
I have crashed on all the Density puzzles using linux ( http://fold.it/portal/node/2003463 ). I hadn't gotten any response from UW, so I told inkycatz about it in veteran chat. Still haven't got any reply from UW.
I've had to switch back to Windows to do any Density puzzles.
Paul

Joined: 09/20/2010
Groups: Go Science

Running 5-3 under gdb (ubuntu 16.04)

Reading symbols from Foldit...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/paul/Foldit/Main/Foldit
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffea15d2c0 (LWP 14123)]
[New Thread 0x7fffe89062c0 (LWP 14124)]
[New Thread 0x7fffe85022c0 (LWP 14125)]
[New Thread 0x7fffe3fff2c0 (LWP 14126)]
[New Thread 0x7fffe3afb2c0 (LWP 14219)]
[New Thread 0x7fffe2bfa2c0 (LWP 14220)]
[New Thread 0x7fffe27f62c0 (LWP 14221)]
[New Thread 0x7fffe23f22c0 (LWP 14222)]
[Thread 0x7fffea15d2c0 (LWP 14123) exited]
[Thread 0x7fffe2bfa2c0 (LWP 14220) exited]
[New Thread 0x7fffe2bfa2c0 (LWP 14224)]
terminate called recursively
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc

Thread 1 "Foldit" received signal SIGABRT, Aborted.
0x00007ffff72a7428 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

Joined: 09/20/2010
Groups: Go Science

Running 5-3 under gdb (ubuntu 16.04)

Reading symbols from Foldit...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/paul/Foldit/Main/Foldit
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffea15d2c0 (LWP 14123)]
[New Thread 0x7fffe89062c0 (LWP 14124)]
[New Thread 0x7fffe85022c0 (LWP 14125)]
[New Thread 0x7fffe3fff2c0 (LWP 14126)]
[New Thread 0x7fffe3afb2c0 (LWP 14219)]
[New Thread 0x7fffe2bfa2c0 (LWP 14220)]
[New Thread 0x7fffe27f62c0 (LWP 14221)]
[New Thread 0x7fffe23f22c0 (LWP 14222)]
[Thread 0x7fffea15d2c0 (LWP 14123) exited]
[Thread 0x7fffe2bfa2c0 (LWP 14220) exited]
[New Thread 0x7fffe2bfa2c0 (LWP 14224)]
terminate called recursively
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc

Thread 1 "Foldit" received signal SIGABRT, Aborted.
0x00007ffff72a7428 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

jeff101's picture
User offline. Last seen 2 days 14 hours ago. Offline
Joined: 04/20/2012
Groups: Go Science

On Windows at least, when Foldit crashes, it puts key
info in the files log.txt and debug.txt. These files
are in the same directory as the puzzles, cmp-binary-*,
cmp-database-*, and cmp-resources-* directories. The
endings to these cmp-* directories depend on when you
installed Foldit. If you can attach your log.txt and
debug.txt files to posts here, it can help determine
what went wrong. Listing the full names for your cmp-*
directories like below is also helpful:

11/2/16 1:16am cmp-binary-73e1721ff27bbcaee4c54d6970b5073d
11/2/16 1:16am cmp-database-771dc52e1548805e069e408cdfc4d236
11/2/16 1:16am cmp-resources-ab3bbc6032c8a9370a11d4d559996aad

log.txt seems to list them too:

binary
local:  '73e1721ff27bbcaee4c54d6970b5073d'
remote: '723ed6cab4ebe4776d6b41b7c6f68bf6'
database
local:  '771dc52e1548805e069e408cdfc4d236'
remote: '13ca17eee5b5fb0b2e0e69fc866b1800'
resources
local:  'ab3bbc6032c8a9370a11d4d559996aad'
remote: '489ec613e4217d895035188c54ae9fb9'
eromana's picture
User offline. Last seen 9 weeks 1 day ago. Offline
Joined: 02/16/2013
Groups: Gargleblasters

~~~

Hi All

I can also confirm Foldit 5-3
crash on linux mint.
the command line
~/foldit/Foldit $ ./Foldit
loads the ed intro puzzle
which crashes after the first shake

The console output looks like

*** Error in `./Foldit':
double free or corruption
(fasttop): 0x00007fcd782561a0 ***
======= Backtrace: =========
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fcd8c7627e5]
Aborted

~~~~~

According to the log file generated by

~/foldit/Foldit $ sudo strace -o foldit_5_3_log01.txt ./Foldit

On my system the required files /x86_64/libdl.so.2 and others
are instead in my local directories under lib/x86_64-linux-gnu

perhaps compile foldit with

LD_LIBRARY_PATH=..../lib/x86_64-linux-gnu

might help

Best ed

~~~

jeff101's picture
User offline. Last seen 2 days 14 hours ago. Offline
Joined: 04/20/2012
Groups: Go Science

A day couple days ago, isaksson told me he tried
5-3 in Linux and it crashed immediately every time.
He said it gave the following messages:

updating surface...
setting side chain mode to: 1 Show stubs
sending SOPs
core.scoring.electron_density.xray_scattering
[warning] Unknown atom
(many of these rows)
like 300-400 rows

actiasluna's picture
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 03/05/2015
Groups: Gargleblasters

Related to what's happening in the current Mac Client? https://fold.it/portal/node/2003690

Joined: 09/24/2012
Groups: Go Science

Seems that it crashes in all ED puzzle in Linux (or only in Linux installed on a Mac hardware?)

see also
http://fold.it/portal/node/2003463

and 1366b crashes on the first action for me (ubuntu 17.04 installed on a partition of a MacBook Pro i7).

jeff101's picture
User offline. Last seen 2 days 14 hours ago. Offline
Joined: 04/20/2012
Groups: Go Science

Try Wine?

Recently, parker25 told me that when he tried
to run Foldit directly in Linux, it was giving
him all kinds of problems, bugs, crashes, etc.
He found it easier to run Foldit within Wine
on his Linux machine.

He said that the Wine website said that Wine
is not a Windows emulator but rather implements
the Windows APIs to work on Mac, Linux, or BSD.
He said that you can run Windows programs in
Wine on Linux systems.

Thus, I suggest that if Foldit is having trouble
running directly on your Linux or Mac system,
you should try running the Windows version of
Foldit in Wine on your Linux or Mac system.
If Tutorial 5-3 or other Foldit ED Puzzles are
crashing on your machine, perhaps they will
work if you instead run them using the Windows
version of Foldit within Wine on your machine.

If you try these things, please post about what
happens.

Thanks, and good luck!
Jeff

ia_ia's picture
User offline. Last seen 1 year 21 weeks ago. Offline
Joined: 06/02/2017
Groups: None

i am have same problem.
wiggle all and crash on puzzle 5-3 and all where used electron density
Linux Mint Cinamon 18.1

eromana's picture
User offline. Last seen 9 weeks 1 day ago. Offline
Joined: 02/16/2013
Groups: Gargleblasters

~~~

on 15 Sep 2017 I re ran a trace of Foldit Linux beta on my laptop with the command

$ sudo strace -o traceFoldit15sep2017.txt ./Foldit

that is: grant permission to, run program strace, put the output in file traceFildit15sep2017.txt, run Foldit

we open a Beginner Electron Density puzzle, which crashes on the first wiggle

the command console displays the lines:

*** Error in `./Foldit': double free or corruption (fasttop): 0x00007f2344256690 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f2355ee27e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f2355eeb37a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f2355eef53c]
cmp-binary- <...>
terminate called after throwing an instance of 'std::bad_alloc'
<...>
***

We look at first 10 lines of the trace file with the command

$ head -10 traceFoldit15sep2017.txt

which gives

execve("./Foldit", ["./Foldit"], [/* 27 vars */]) = 0
brk(NULL) = 0x992000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2356bf4000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2356bf3000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("../../external/lib/tls/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("../../external/lib/tls/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("../../external/lib/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("../../external/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

from Google I think the first 2 occurrences of (No such file or directory) are dismissible,

the third is not. The inability to find the libdl.so.2 library seems to be related to legacy software,

on my current machine, Linux Mint 18.2 kernel 4.11.0-14, the libdl.so.2 libraries are installed to different directories

$ locate -b libdl.so.2

/lib/i386-linux-gnu/libdl.so.2
/lib/x86_64-linux-gnu/libdl.so.2
/lib32/libdl.so.2
/libx32/libdl.so.2

Hope this helps

Ed

~~~

Sitemap

Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, RosettaCommons