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 788926 - Video playback pauses/stutters while totem writes to ~/.config/totem/session_state.xspf
Video playback pauses/stutters while totem writes to ~/.config/totem/session_...
Status: RESOLVED DUPLICATE of bug 733780
Product: totem
Classification: Core
Component: general
3.26.x
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-10-13 10:01 UTC by Daniel van Vugt
Modified: 2017-10-19 07:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel van Vugt 2017-10-13 10:01:33 UTC
Video playback pauses/stutters while totem writes to ~/.config/totem/session_state.xspf

This happens frequently even when the video file being played is fully cached in RAM.

strace says it was doing this:

openat(AT_FDCWD, "/home/dan/.config/totem/.goutputstream-JQJD8Y", O_WRONLY|O_CREAT|O_EXCL, 0666) = 38
fchown(38, 1000, 1000)                  = 0
fchmod(38, 0100664)                     = 0
write(38, "<?xml version=\"1.0\" encoding=\"UT"..., 105) = 105
write(38, "  <track>\n   <location>file:///h"..., 95) = 95
write(38, "   <title>Blender Foundation 200"..., 107) = 107
write(38, "   <extension application=\"http:"..., 84) = 84
write(38, "     <playing>true</playing>\n", 29) = 29
write(38, "   </extension>\n", 16)      = 16
write(38, "  </track>\n", 11)           = 11
write(38, " </trackList>\n</playlist>", 25) = 25
fsync(38)                               = 0
rename("/home/dan/.config/totem/.goutputstream-JQJD8Y", "/home/dan/.config/totem/session_state.xspf") = 0
fstat(38, {st_mode=S_IFREG|0664, st_size=472, ...}) = 0
close(38)  

and some debug output I've placed in clutter says there's a gap of over 200ms between frames when this happens. It's quite noticeable on-screen.
Comment 1 Daniel van Vugt 2017-10-13 10:03:37 UTC
Maybe the fsync is excessive?
Comment 2 Bastien Nocera 2017-10-13 14:19:54 UTC
The fsync is run by g_file_set_contents(), not by totem itself.

Thanks for taking the time to report this.
This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 733780 ***
Comment 3 Daniel van Vugt 2017-10-19 07:56:52 UTC
Actually the offending fsync is the other one - in _g_local_file_output_stream_really_close().

Confirmed also by the stack traces in bug 733780.