View Issue Details

IDProjectCategoryView StatusLast Update
0003325Slicer4Core: Extensionspublic2017-06-07 23:27
ReporterpieperAssigned Tojcfr 
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Platformubuntu 13.04OSOS Version
Product Version 
Target VersionSlicer 4.3.1Fixed in VersionSlicer 4.4.0 
Summary0003325: crash on linux showing extension manager
Description

I can see some of the content of the extension manager, then slicer crashes.

Steps To Reproduce

Start slicer
Pick Show Extension Manager
(crash)

Additional Information

The last lines of running strace on SlicerApp-real inside of a launcher launched xterm are below. It looks like there may be an issue related to the cookies file.

mmap(NULL, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f25040ef000
stat("/home/pieper/.config/NA-MIC/Slicer-22328.ini", {st_mode=S_IFREG|0664, st_size=497, ...}) = 0
open("/home/pieper/.config/NA-MIC/Slicer-22328.ini", O_RDONLY|O_CLOEXEC) = 29
fcntl(29, F_SETFD, FD_CLOEXEC) = 0
fstat(29, {st_mode=S_IFREG|0664, st_size=497, ...}) = 0
close(29) = 0
stat("/home/pieper/.config/NA-MIC/Slicer-22328.ini", {st_mode=S_IFREG|0664, st_size=497, ...}) = 0
stat("/home/pieper/.config/NA-MIC/Slicer-22328.ini", {st_mode=S_IFREG|0664, st_size=497, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f25040ee000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f25040ec000
munmap(0x7f2586a10000, 4096) = 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f25040e8000
munmap(0x7f25040ec000, 8192) = 0
munmap(0x7f25040e9000, 12288) = 0
stat("/home/pieper/.config/NA-MIC/Slicer-22328.ini", {st_mode=S_IFREG|0664, st_size=497, ...}) = 0
open("/home/pieper/.config/NA-MIC/Slicer-22328.ini", O_RDONLY|O_CLOEXEC) = 29
fcntl(29, F_SETFD, FD_CLOEXEC) = 0
fstat(29, {st_mode=S_IFREG|0664, st_size=497, ...}) = 0
close(29) = 0
stat("/home/pieper/.config/NA-MIC/Slicer-22328.ini", {st_mode=S_IFREG|0664, st_size=497, ...}) = 0
stat("/home/pieper/.config/NA-MIC/Slicer-22328.ini", {st_mode=S_IFREG|0664, st_size=497, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
writev(6, [{"\213\24a\0\266\33\0\5\1\0\0\0006\0\0\0\n\0\t\0\1\0\t\0\10\0\0\0\0\0\0\0"..., 16368}, {"\31\2\0\2\374\311a\311;\234\353\234\0\0\v\0\31\2\0\2\374\311a\311;\234\353\234\0\0\v\0"..., 144}, {"", 0}], 3) = 16512
mmap(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2586a10000
mmap(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f25040ed000
stat("/home/pieper/.config/NA-MIC/Slicer-22328.ini", {st_mode=S_IFREG|0664, st_size=497, ...}) = 0
open("/home/pieper/.config/NA-MIC/Slicer-22328.ini", O_RDONLY|O_CLOEXEC) = 29
fcntl(29, F_SETFD, FD_CLOEXEC) = 0
fstat(29, {st_mode=S_IFREG|0664, st_size=497, ...}) = 0
close(29) = 0
stat("/home/pieper/.config/NA-MIC/Slicer-22328.ini", {st_mode=S_IFREG|0664, st_size=497, ...}) = 0
stat("/home/pieper/.config/NA-MIC/Slicer-22328.ini", {st_mode=S_IFREG|0664, st_size=497, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
stat("/home/pieper/.config/NA-MIC/cookies.ini", {st_mode=S_IFREG|0664, st_size=244, ...}) = 0
open("/home/pieper/.config/NA-MIC/cookies.ini", O_RDONLY|O_CLOEXEC) = 29
fcntl(29, F_SETFD, FD_CLOEXEC) = 0
fstat(29, {st_mode=S_IFREG|0664, st_size=244, ...}) = 0
close(29) = 0
stat("/home/pieper/.config/NA-MIC/cookies.ini", {st_mode=S_IFREG|0664, st_size=244, ...}) = 0
stat("/home/pieper/.config/NA-MIC/cookies.ini", {st_mode=S_IFREG|0664, st_size=244, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
futex(0x4f0095c, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x4f00958, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)
pieper@boggs:/tmp$

TagsNo tags attached.

Relationships

has duplicate 0003394 closedjcfr Exit abnormally loading extension manager 
related to 0003393 closedjcfr Cannot download Extentions 

Activities

pieper

pieper

2013-08-26 11:16

administrator   ~0009597

The nightly build seems to work for other tasks tested.

A release build of the current trunk on the same machine does not have this issue.

pieper

pieper

2013-08-26 11:21

administrator   ~0009598

Looking at the output of ldd on the SlicerApp-real binary, the only suspicious thing I see is that we are resolving to the system version of zlib rather than something bundled from slicer's build version of zlib. Is this expected?

libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7cac18c000)

jcfr

jcfr

2013-08-26 11:28

administrator   ~0009599

Did you make sure to use 'ldd' after starting a terminal using the Slicer launcher ?

pieper

pieper

2013-09-09 10:06

administrator   ~0009904

This is still an issue with the 4.3 release build (downloaded today)

Re note 9598, yes, that was in a shell created with the launcher. All the other libraries appear to be correct.

pieper

pieper

2013-09-09 10:08

administrator   ~0009906

Tried removing Extensions folders as pasted below. After this I was able to see all extensions and pick one to install but then got a crash during installation.

pieper@boggs:~/slicer4/latest/Slicer-superr$ ls ~/.config/Extensions-22*
/home/pieper/.config/Extensions-22199:

/home/pieper/.config/Extensions-22233:

/home/pieper/.config/Extensions-22243:

/home/pieper/.config/Extensions-22251:

/home/pieper/.config/Extensions-22255:

/home/pieper/.config/Extensions-22257:

/home/pieper/.config/Extensions-22287:
pieper@boggs:~/slicer4/latest/Slicer-superr$ rm -rf ~/.config/Extensions-22*

pieper

pieper

2013-09-09 10:21

administrator   ~0009907

This seems to have fixed the crash:

$ rm -rf ~/.config/Trolltech.conf

I didn't save a copy, but the file contained cache links to various qt plugins from previous versions of slicer. A new version was created after running slicer again where all the paths point into the new directory.

I have not gotten a crash since deleting the file.

jcfr

jcfr

2013-09-20 15:13

administrator   ~0010037

Last edited: 2013-09-20 15:14

After updating my work station to Ubuntu 13.04, I started to experience crash after showing the extensions manager.

To systematically reproduce the issue, I came up with the following.

Using 4.7.4 / Slicer r22457

I did 300 copy of one of the CLI shared library (i.e AddScalarVolumes) using the following bash command:

// ---------------
cd /path/to/Slicer-SuperBuild-Debug/Slicer-build/lib/Slicer-4.3/cli-modules

for i in seq 1 150;
do
echo "Copying into libFoo${i}Lib.so"
cp libAddScalarVolumesLib.so libFoo${i}Lib.so
done
// ---------------

then created a destination folder:

mkdir /path/to/Slicer-SuperBuild-Debug/Slicer-build/lib/Slicer-4.3/foo-cli-modules

and copy the copied module into it

cp /path/to/Slicer-SuperBuild-Debug/Slicer-build/lib/Slicer-4.3/cli-modules/libFoo* /path/to/Slicer-SuperBuild-Debug/Slicer-build/lib/Slicer-4.3/foo-cli-modules

// ---------------

renamed the existing module folders to prevent them from being loaded:

cd /path/to/Slicer-SuperBuild-Debug/Slicer-build/lib/Slicer-4.3/

mv cli-modules cli-modules-disabled
mv qt-loadable-modules qt-loadable-modules-disabled
mv qt-scripted-loadable-modules qt-scripted-loadable-modules-disabled

// ---------------

started Slicer using the following ...

./Slicer --additional-module-path /home/jchris/Projects/Slicer-SuperBuild-Debug/Slicer-build/lib/Slicer-4.3/foo-cli-modules/

=> Crash

./Slicer --disable-python --additional-module-path /home/jchris/Projects/Slicer-SuperBuild-Debug/Slicer-build/lib/Slicer-4.3/foo-cli-modules/ --disable-python

=> Crash

./Slicer --disable-python --disable-message-handlers --additional-module-path /home/jchris/Projects/Slicer-SuperBuild-Debug/Slicer-build/lib/Slicer-4.3/foo-cli-modules/

=> Crash

Commented code related to:

Message handler, ProxyStyle, CookieJar in Slicer webWidget

=> Crash

Interestingly, if a loadable module (Cameras one) is copied 150 times, or if the DoIt method (templated code) is removed from the CLI

=> No Crash - This could be explained by the fact the shared library is less than 1Kb instead of being ~9Mb

// --------------------------
// --------------------------
// --------------------------

Additional remarks:

  • Even after building Qt and Slicer in Debug, there are no useful stacktrace (either attaching the process or loading the core dump)

  • Checking if the maximum number of file per process has been reached has also been investigated (using lsof, ulimit) and this is not an issue.

  • Updating to either 4.8.1 (Release) or 4.8.5 (Release or Debug) doesn't cause problem.

Action plan:

  • Before updating to 4.8.5, will have to investigate the implication regarding 0002705
jcfr

jcfr

2013-09-21 16:33

administrator   ~0010038

Step 1: Compile Slicer, then copy "libAddScalarVolumesLib" into "foo-cli-modules" folder.

Step 2: Build program attached using against Qt 4.7.4

qmake
make

Step 3: Execute and you will see the crash:

./TrackWebKitCrash /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt476/Slicer-build/lib/Slicer-4.3/foo-cli-modules/

2013-09-21 16:35

 

TrackWebKitCrash.pro (324 bytes)

2013-09-21 16:35

 

TrackWebKitCrash.cpp (858 bytes)
jcfr

jcfr

2013-09-23 00:34

administrator   ~0010042

Since building against Qt 4.8.5 prevent Slicer from crashing. Please, give a try using the latest nightly. See http://download.slicer.org

Note that r22466 [1] simplify the requirement for Qt version and any version >= 4.7.4 will now be accepted.

[1] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=22466

pieper

pieper

2013-09-23 15:27

administrator   ~0010074

This will be hard to test because I no longer have the Trolltech.conf file. Also, until Oct 6 I won't have access to the linux machine. But your testing looks conclusive to me, so for bookkeeping purposes leading up to the release I will close this now and re-open it if the issue comes back.

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file 82e73bfc

2013-09-21 22:45:02

jcfr

Details Diff
COMP: Simplify Qt version requirement rules

As explained in issue 0003325, on linux to prevent a crash occurring when
a page is loaded in a QWebView, at least Qt 4.8.1 is needed
on Ubuntu 13.04. Alberto also reported it is crashing when using
Ubuntu 12.04 (see 0003394).

To prevent developer from having to explicitly pass
the Slicer_REQUIRED_QT_VERSION option, the requirement scheme
has been simplified.

Removed non working option "Slicer_EXPERIMENTAL_QT_VERSION" and requires
at least Qt 4.7.4 on all platform.

This revert commit r21743 and partially revert r21727

We will discuss with the community if it makes sens to required Qt >= 4.8.1
on all platform. On MacOSX, this implies that Leopard won't be supported
anymore.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22466 3bd1e089-480b-0410-8dfb-8563597acbee
mod - CMake/SlicerBlockFindQtAndCheckVersion.cmake Diff File
mod - CMake/SlicerConfig.cmake.in Diff File
mod - CMakeLists.txt Diff File

Issue History

Date Modified Username Field Change
2013-08-26 11:09 pieper New Issue
2013-08-26 11:09 pieper Status new => assigned
2013-08-26 11:09 pieper Assigned To => jcfr
2013-08-26 11:16 pieper Note Added: 0009597
2013-08-26 11:21 pieper Note Added: 0009598
2013-08-26 11:28 jcfr Note Added: 0009599
2013-09-02 19:12 jcfr Target Version Slicer 4.3.0 => Slicer 4.3.1
2013-09-09 10:06 pieper Note Added: 0009904
2013-09-09 10:08 pieper Note Added: 0009906
2013-09-09 10:21 pieper Note Added: 0009907
2013-09-18 06:49 jcfr Relationship added related to 0003394
2013-09-20 15:13 jcfr Note Added: 0010037
2013-09-20 15:14 jcfr Note Edited: 0010037
2013-09-21 16:33 jcfr Note Added: 0010038
2013-09-21 16:35 jcfr File Added: TrackWebKitCrash.pro
2013-09-21 16:35 jcfr File Added: TrackWebKitCrash.cpp
2013-09-23 00:34 jcfr Note Added: 0010042
2013-09-23 00:34 jcfr Status assigned => resolved
2013-09-23 00:34 jcfr Fixed in Version => Slicer 4.3.1
2013-09-23 00:34 jcfr Resolution open => fixed
2013-09-23 00:35 jcfr Relationship replaced has duplicate 0003394
2013-09-23 15:27 pieper Note Added: 0010074
2013-09-23 15:27 pieper Status resolved => closed
2013-09-23 15:27 pieper Fixed in Version Slicer 4.3.1 => Slicer 4.3.2
2013-10-01 10:00 jcfr Relationship added related to 0003393
2014-03-06 10:17 nicole Fixed in Version Slicer 4.3.2 => Slicer 4.4.0
2017-06-07 23:27 jcfr Changeset attached => Slicer 2145-support-for-installing-extension-from-file 82e73bfc