After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 663501 - Totem is not responding when launched multiple times
Totem is not responding when launched multiple times
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: general
unspecified
Other Linux
: High critical
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
: 671229 676409 693793 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-11-06 13:17 UTC by thibault.drevet
Modified: 2013-02-22 12:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot of the notification (22.16 KB, image/png)
2011-11-06 13:17 UTC, thibault.drevet
Details
gdb-totem.txt (21.26 KB, text/plain)
2011-12-08 18:37 UTC, thibault.drevet
Details
gdb-totem2.txt (18.65 KB, text/plain)
2011-12-08 18:47 UTC, thibault.drevet
Details
gdb_totem3.txt (24.06 KB, text/plain)
2011-12-10 17:26 UTC, thibault.drevet
Details
screenshot_before_gdb.png (90.70 KB, image/png)
2011-12-10 17:27 UTC, thibault.drevet
Details
screenshot_during_gdb.png (116.75 KB, image/png)
2011-12-10 17:27 UTC, thibault.drevet
Details

Description thibault.drevet 2011-11-06 13:17:23 UTC
Created attachment 200831 [details]
screenshot of the notification

Distribution : Ubuntu Oneiric 11.10 (French)

1. double click 3 or 4 times on an .avi file (by default Ubuntu will start totem multiple times)
3. Totem will not respond, resulting in the following notification:
- "The window 'video player' is not responding."
- "Forcing this application to quit will cause you to lose any unsaved changes."

Since it is the same video being launched several times, I think we could avoid this issue with Totem only starting once (or prompt a message asking if one wants to open the same video twice or more, explaining that this may slow down the computer).
Comment 1 Bastien Nocera 2011-11-07 13:42:57 UTC
Thanks for taking the time to report this bug.
Without a stack trace from the hang it's very hard to determine what caused it.
Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Comment 2 thibault.drevet 2011-12-06 22:21:27 UTC
I've tried to follow both instructions on "http://live.gnome.org/GettingTraces" and "https://wiki.ubuntu.com/Backtrace".

But I did not managed to get a backtrace since this method requires to launch the program before producing the bug. And this bug happens when you launch totem quickly several times.

I managed to reproduce the bug with this file (220 Mo):
http://download.blender.org/peach/bigbuckbunny_movies1/big_buck_bunny_480p_surround-fix.avi

1. Click 3 times on the .avi
2. Totem will open twice with two process IDs 
3. The two totem windows will not respond and become grey
4. When you close one of them the error message prompts

I don't know if this will help, but gnome-system-monitor also provides this : 
- first totem process : "unix_stream_data_wait"
- second totem process : "poll_schedule_timeout"
Comment 3 Philip Withnall 2011-12-08 00:10:17 UTC
(In reply to comment #2)
> I've tried to follow both instructions on "http://live.gnome.org/GettingTraces"
> and "https://wiki.ubuntu.com/Backtrace".
> 
> But I did not managed to get a backtrace since this method requires to launch
> the program before producing the bug. And this bug happens when you launch
> totem quickly several times.

If you manage to get two instances of Totem into that state, you can attach a debugger to them using the following command to start gdb, and then the command below it to get a backtrace:

    gdb /usr/bin/totem [process ID]
    thread apply all backtrace full
Comment 4 thibault.drevet 2011-12-08 18:36:45 UTC
I've already tried using the information on "https://wiki.ubuntu.com/Backtrace#Already_running_programs".

The result was (for both PID) : "Could not attach to process.  If your uid matches the uid of the target process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try again as the root user. For more details, see /etc/sysctl.d/10-ptrace.confptrace: Opération non permise."

And saddly I get the same error message with your proposed method.

So I tried the Ubuntu command strating with "sudo gdb..." and I managed to get results for 1 out of 2 PID. The result is attached : "gdb-totem.txt".
Comment 5 thibault.drevet 2011-12-08 18:37:38 UTC
Created attachment 203103 [details]
gdb-totem.txt
Comment 6 thibault.drevet 2011-12-08 18:47:53 UTC
Created attachment 203105 [details]
gdb-totem2.txt

And with your method and sudo => gdb-totem2.txt
Comment 7 Philip Withnall 2011-12-09 09:09:08 UTC
Are you sure both instances of Totem had hanged when you made those backtraces? I can't see anything unusual about them, and nothing to indicate that they had hanged (or why).

> I don't know if this will help, but gnome-system-monitor also provides this : 
> - first totem process : "unix_stream_data_wait"
> - second totem process : "poll_schedule_timeout"

Does gnome-system-monitor always list those two functions when Totem is hanging? If so, I would expect them to be in the backtraces you get from gdb.

Thanks.
Comment 8 thibault.drevet 2011-12-09 13:28:24 UTC
> Are you sure both instances of Totem had hanged when you made those backtraces?

Yes, I am sure both instances of Totem had hanged :
- gnome-system-monitor shows two process (and "pidof" gives me two PID also)
- both windows of Totem are grey

I can even manage to get three instances if I click four times on the .avi

> Does gnome-system-monitor always list those two functions

Yes, whith 3 instances I get :
- "poll_schedule_timeout" for the first PID
- "unix_stream_data_wait" for the next two
Comment 9 thibault.drevet 2011-12-10 17:26:39 UTC
Created attachment 203185 [details]
gdb_totem3.txt

same trace with 8 instances of Totem running.
And I don't think we get something either...
Comment 10 thibault.drevet 2011-12-10 17:27:19 UTC
Created attachment 203186 [details]
screenshot_before_gdb.png
Comment 11 thibault.drevet 2011-12-10 17:27:51 UTC
Created attachment 203187 [details]
screenshot_during_gdb.png
Comment 12 Philip Withnall 2011-12-13 15:09:34 UTC
Bastien, something to do with this: http://git.gnome.org/browse/totem/tree/src/totem.c#n181 ?

Thibault, thanks for the stacktrace; the last one is quite useful.
Comment 13 Bastien Nocera 2012-03-28 15:37:30 UTC
Easily reproduced with:
for i in `seq 1 4` ; do ./totem ~/videofile.avi & done
Comment 14 Bastien Nocera 2012-03-28 15:50:08 UTC
*** Bug 671229 has been marked as a duplicate of this bug. ***
Comment 15 Bastien Nocera 2012-03-29 13:26:48 UTC
commit 806d6e673fe1ee4f89c57998fbfc7668570dff8e
Author: Bastien Nocera <hadess@hadess.net>
Date:   Thu Mar 29 15:21:12 2012 +0200

    main: Remove calls to gtk_main_iteration()
    
    A good way to break things (like hang with multiple windows opened
    when launched a bit too quickly because we didn't say we were done
    setting up the first window)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=663501
Comment 16 Bastien Nocera 2012-05-21 10:10:53 UTC
*** Bug 676409 has been marked as a duplicate of this bug. ***
Comment 17 Bastien Nocera 2013-02-22 12:11:34 UTC
*** Bug 693793 has been marked as a duplicate of this bug. ***