libreoffice hangs when started
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2004
    Posts
    4,081
    Linux (Fedora) Firefox 61.0

    libreoffice hangs when started

    On a FC 27 machine , root can run Libreoffice, from the command line, but it hangs and never starts when run by the (only) user on the machine. This problem began yesterday. There were no updates or installs in the days before the problem started.


    [cosmo@calvycat user]$ uname -a
    Linux calvycat 4.17.6-100.fc27.x86_64 #1 SMP Wed Jul 11 20:26:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


    LibreOffice
    Version: 5.4.7.2
    Build ID: 5.4.7.2-3.fc27
    CPU threads: 3; OS: Linux 4.17; UI render: default; VCL: gtk3;
    Locale: en-US (en_US.UTF-8); Calc: groupstrace libreoffice --writer


    Last part of output from: strace libreoffice --writer



    lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    lstat("/home/cosmo", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
    lstat("/home/cosmo/.config", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    lstat("/home/cosmo/.config/libreoffice", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    lstat("/home/cosmo/.config/libreoffice/4", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
    access("/tmp", W_OK) = 0
    getuid() = 1000
    socket(AF_UNIX, SOCK_STREAM, 0) = 4
    fcntl(4, F_SETFD, FD_CLOEXEC) = 0
    connect(4, {sa_family=AF_UNIX, sun_path="/tmp/OSL_PIPE_1000_SingleOfficeIPC_7fe08590577bda492d50 87835495b89"}, 110

    The last line is where it hangs.
    "Never let the task you are trying to accomplish distract you from the study of computers."

  2. #2
    Join Date
    Aug 2004
    Posts
    4,081
    Linux (Fedora) Firefox 61.0

    Re: libreoffice hangs when started

    The solution was (as root) to remove the file /tmp/OSL_PIPE_1000_SingleOfficeIPC_7fe08590577bda492d50 87835495b89

    Someone explain what's going on!
    "Never let the task you are trying to accomplish distract you from the study of computers."

  3. #3
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    2,973
    Linux (Fedora) Firefox 60.0

    Re: libreoffice hangs when started

    I just stopped and restarted LibreOffice and in each case "lsof | grep OSL" returned the same Unix domain socket name.
    From this I suspect that the key part of the name of that socket is something that has been written into a configuration file during installation.

    Hence, my explananation for your problem is that when you ran LibreOffice as root it created an OSL socket with root privileges and, for some reason, did not clean up properly on exit. This meant the the next user was unable to create or connect to the socket.

    You really should not run complex programs like LibreOffice (or any GUI for that matter) as root.

    User error. Please replace user and try again

  4. #4
    Join Date
    Aug 2004
    Posts
    4,081
    Linux (Fedora) Firefox 38.0

    Re: libreoffice hangs when started

    Quote Originally Posted by ocratato
    You really should not run complex programs like LibreOffice (or any GUI for that matter) as root.
    I didn't run LibreOffice as root until the problem with it developed for the ordinary user. Is there a way that the ordinary user could have created an unusable tmp/OSL_.... socket file ?
    "Never let the task you are trying to accomplish distract you from the study of computers."

  5. #5
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    2,973
    Linux (Fedora) Firefox 60.0

    Re: libreoffice hangs when started

    I have just had a quick look at the strace output (with the -f option to see child processes).

    It would appear that when you first start libreoffice it tries to connect to that Unix domain socket.
    If it fails due to it not existing then it launches soffice.bin which then creates the socket.
    The soffice.bin also gets to remove it when it terminates.

    If the socket exists then the connect call will attempt to contact the soffice.bin. This allows subsequent runs of writer etc to attach to the existing running program rather than start a new instance.

    In your case it would appear that the socket file existed, but soffice.bin was not running.
    This caused writer to wait indefinitely.

    The implication is that either libreoffice was not shut down cleanly, or there is a flaw in the program when it shuts down.
    (The latter would not be surprising - shutting down a multi-threaded, multi-process application is one of the more complex programming problems.)

    User error. Please replace user and try again

  6. #6
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    5,303
    Linux (Ubuntu) Firefox 44.0

    Re: libreoffice hangs when started

    Ocratato,
    I want to say thank you for the explanations you provided to to the use of lstat, lsof, and strace. In this area of using Linux, I have no experience and do not have much occasion to do the debugging at that level.

    Thank you again to you and to tashirosgt for discussing the issue
    By the way, since /tmp on Fedora is a tmpfs file, the problem is usually cured with a reboot.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

Similar Threads

  1. Fedora 15 bootup hangs at "Started Display Manager"
    By crizzola in forum EOL (End Of Life) Versions
    Replies: 1
    Last Post: 5th July 2013, 06:11 PM
  2. [SOLVED]
    System hangs after upgrade to FC18 ("started gdm")
    By ChrisGGG in forum Using Fedora
    Replies: 3
    Last Post: 12th May 2013, 10:04 AM
  3. Replies: 17
    Last Post: 4th December 2012, 09:14 AM
  4. Replies: 0
    Last Post: 29th June 2011, 03:40 AM
  5. Replies: 7
    Last Post: 2nd February 2007, 10:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •