Qtox: Can't start second qTox instance on Linux

Created on 23 Oct 2015  Â·  11Comments  Â·  Source: qTox/qTox

$ qtox
[05:16:04.363] src/persistence/settings.cpp:120 : Debug: "Loading settings from /home/vi/home/vil/.config/tox/qtox.ini"
[05:16:04.365] src/ipc.cpp:46 : Debug: Our global IPC ID is  17290262090124805446
[05:16:04.365] src/ipc.cpp:68 : Debug: Failed to attach to the global shared memory, giving up
[05:16:04.366] src/main.cpp:141 : Debug: built on:  22:09:31 Oct 21 2015 ( 1445479676 )
[05:16:04.366] src/main.cpp:142 : Debug: commit:  33e54b841a6fd1995d08bd734e8c018a13b9420c 

[05:16:04.366] src/ipc.cpp:153 : Warning: isCurrentOwner failed to lock, returning false
[05:16:04.366] src/ipc.cpp:131 : Debug: Failed to lock in postEvent()
Segmentation fault

Workaround: use TMPDIR

$ mkdir -p /tmp/tmp3
$ TMPDIR=/tmp/tmp3 qtox
[05:16:52.514] src/persistence/settings.cpp:120 : Debug: "Loading settings from /home/vi/home/vil/.config/tox/qtox.ini"
[05:16:52.515] src/ipc.cpp:46 : Debug: Our global IPC ID is  10281748964811859422
[05:16:52.516] src/main.cpp:141 : Debug: built on:  22:09:31 Oct 21 2015 ( 1445479676 )
[05:16:52.516] src/main.cpp:142 : Debug: commit:  33e54b841a6fd1995d08bd734e8c018a13b9420c 

[05:16:52.516] src/nexus.cpp:78 : Debug: Starting up
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: i965
[05:16:56.156] src/persistence/profile.cpp:76 : Debug: Loading tox save  "/home/vi/home/vil/.config/tox/toxic_profile.tox"
[05:16:56.157] src/persistence/settings.cpp:344 : Debug: "Saving global settings at /home/vi/home/vil/.config/tox/qtox.ini"
[05:16:56.243] src/persistence/settings.cpp:287 : Debug: Loading personnal settings from "/home/vi/home/vil/.config/tox/toxic_profile.ini"
[05:16:56.931] src/core/core.cpp:257 : Debug: Loading user profile
[05:16:56.931] src/persistence/profile.cpp:238 : Debug: Loading tox save  "/home/vi/home/vil/.config/tox/toxic_profile.tox"
[05:16:56.931] src/core/core.cpp:146 : Debug: Core starting with IPv6 enabled
[05:16:56.935] src/core/core.cpp:340 : Debug: Self avatar not found, will broadcast empty avatar to friends
[05:16:57.343] src/widget/systemtrayicon.cpp:130 : Debug: Using the Qt backend
[05:16:58.506] src/core/core.cpp:440 : Debug: "Connecting to 144.76.60.215:33445 (sonOfRa)"
C-bug

Most helpful comment

@a68366 Indeed the startup process seems to be solved.

Anyway the behaviour irritating and users expect that "simply to work". So we should at least display a stderr message and dialog, that another qTox is running - for example:

"Another qTox instance is already running. If you want to start a second instance, please start with a profile (qTox -p <profile name>). 

Think an FAQ would help here, too.

All 11 comments

Well, starting second instance by using qtox is not supported - you would need to use qtox -p $profilename to be able to start second instance.

With that being said, it shouldn't crash.

The problem is not a profile, but /tmp/qipc_sharedmemory_qtox45bdc9c0c458c8a25fc32de3a5f6d795f60b53f9 and /tmp/qipc_sharedmemory_qtox45bdc9c0c458c8a25fc32de3a5f6d795f60b53f9 directories.

Yeah, problem with IPC,

@antis81 ↑ ?

Relates to #2408.

Is this still reproducible on newest qTox?

Let's check this version:

 520-edc35ba https://pkg.tox.chat/debian/ nightly/release i386 Packages

There is still Failed to lock in postEvent(), but without crash.

Couldn't reproduce on b4a87a3a0ed6060321f141d67a138cc0f88a1e86
Second instance is starting normally using qtox -p
No error messages in log

@a68366 Indeed the startup process seems to be solved.

Anyway the behaviour irritating and users expect that "simply to work". So we should at least display a stderr message and dialog, that another qTox is running - for example:

"Another qTox instance is already running. If you want to start a second instance, please start with a profile (qTox -p <profile name>). 

Think an FAQ would help here, too.

Since bug appears to be gone, closing this issue.

As for improving UI/UX, so that users would be informed about a way to open more than one instance → #3483.

The above comments seem to conflate running multiple instances as one user but with different profiles, and running just once but as multiple users. It's pot luck when I start qtox whether it works depending on whether one of the other users on this machine is already running it. If the two IPC directories should not be shared between users then shouldn't they have $LOGNAME in them so multiple users' directories can co-exist?

Was this page helpful?
0 / 5 - 0 ratings