<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>339122</bug_id>
          
          <creation_ts>2014-09-16 15:27:32 +0000</creation_ts>
          <short_desc>kinit stop loading services if one fails to load, resulting in plasmashell and others not loading</short_desc>
          <delta_ts>2014-09-19 21:06:48 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Frameworks and Libraries</classification>
          <product>frameworks-kinit</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>328571</dup_id>
          <see_also>https://bugs.kde.org/show_bug.cgi?id=337889</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="AnAkkk">anakin.cs</reporter>
          <assigned_to name="David Faure">faure</assigned_to>
          <cc>hrvoje.senjan</cc>
    
    <cc>kdelibs-bugs-null</cc>
    
    <cc>rdieter</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1471444</commentid>
    <comment_count>0</comment_count>
    <who name="AnAkkk">anakin.cs</who>
    <bug_when>2014-09-16 15:27:32 +0000</bug_when>
    <thetext>I&apos;ve bought a new laptop and installed Plasma 5 with ArchLinux AUR packages. Almost every time I boot my computer, only 2 services from /etc/xdg/autostart are ran, then it stops, which mean I get a black screen as plasmashell isn&apos;t loaded.

I&apos;ve added many debug messages in klauncher.cpp, and I can see that the krunner service seem to die as the following method is called:
KLauncher::processDied(pid_t pid, long exitStatus)

The problem is that it doesn&apos;t pass the &quot;if (request-&gt;pid == pid)&quot; condition (request-&gt;pid is set to 0 in KLauncher::start_service), which means requestDone(request) never gets called.
If requestDone isn&apos;t called, mAutotimer isn&apos;t reset, so it hangs here and doesn&apos;t run any other services.

I know the issue seem to be krunner, but I guess this needs to be fixed too.

Reproducible: Always</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471447</commentid>
    <comment_count>1</comment_count>
    <who name="AnAkkk">anakin.cs</who>
    <bug_when>2014-09-16 15:35:09 +0000</bug_when>
    <thetext>Actually krunner doesn&apos;t even crash, there&apos;s a first krunner process spawned, which seem to fork itself and exit (return code 0). krunner runs perfectly fine, the issue seem to just be kinit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471450</commentid>
    <comment_count>2</comment_count>
    <who name="AnAkkk">anakin.cs</who>
    <bug_when>2014-09-16 15:40:56 +0000</bug_when>
    <thetext>request-&gt;pid is actually set in requestStart if USE_KPROCESS_FOR_KIOSLAVES is defined, but that isn&apos;t set by default. This means it&apos;ll always be 0, and the condition always fails in KLauncher::processDied.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471692</commentid>
    <comment_count>3</comment_count>
    <who name="AnAkkk">anakin.cs</who>
    <bug_when>2014-09-18 12:10:59 +0000</bug_when>
    <thetext>I&apos;ve removed krunner.desktop, and now I have the same issue with plasmashell.desktop. 
The plasmashell process runs correctly, the desktop appears, but requestDone is never called, which means other .desktop files (such as kmix, pulseaudio, etc) are never ran. I could reproduce the same issue on another computer a few times.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471694</commentid>
    <comment_count>4</comment_count>
    <who name="AnAkkk">anakin.cs</who>
    <bug_when>2014-09-18 12:14:13 +0000</bug_when>
    <thetext>Sorry for the multiple messages.
When I have that bug, I have exactly the same problem as in https://bugs.kde.org/show_bug.cgi?id=328571, so I&apos;m pretty sure it&apos;s the same issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471697</commentid>
    <comment_count>5</comment_count>
    <who name="Rex Dieter">rdieter</who>
    <bug_when>2014-09-18 13:26:56 +0000</bug_when>
    <thetext>Does the workaround from bug #328571 (QT_NO_GLIB=1 )help ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471746</commentid>
    <comment_count>6</comment_count>
    <who name="AnAkkk">anakin.cs</who>
    <bug_when>2014-09-18 17:15:19 +0000</bug_when>
    <thetext>I&apos;ve restarted 4 times with that workaround, I haven&apos;t seen the issue. It&apos;s quite random though, maybe it&apos;ll come back on the next boots.

If it doesn&apos;t, I&apos;ll try with USE_KPROCESS_FOR_KIOSLAVES.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471747</commentid>
    <comment_count>7</comment_count>
    <who name="AnAkkk">anakin.cs</who>
    <bug_when>2014-09-18 17:24:09 +0000</bug_when>
    <thetext>I&apos;ve removed QT_NO_GLIB=1 and the issue came back on the next boot.

I&apos;ve tried to compile kinit with USE_KPROCESS_FOR_KIOSLAVES to avoid the buggy code, but this prevents SDDM from working, I have no display after I set that. Judging by the code it&apos;s only supposed to be for Windows/OSX though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471753</commentid>
    <comment_count>8</comment_count>
    <who name="AnAkkk">anakin.cs</who>
    <bug_when>2014-09-18 17:52:57 +0000</bug_when>
    <thetext>QT_NO_GLIB=1 breaks PulseAudio integration though, so it&apos;s not really a good workaround :/
See https://bbs.archlinux.org/viewtopic.php?id=113254</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471756</commentid>
    <comment_count>9</comment_count>
    <who name="Rex Dieter">rdieter</who>
    <bug_when>2014-09-18 18:01:13 +0000</bug_when>
    <thetext>Not if you use the patch from the other bug, so that the NO_GLIB hack is applied only to autostart items (at least it&apos;s worked fine for me and fedora users in testing).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471757</commentid>
    <comment_count>10</comment_count>
    <who name="AnAkkk">anakin.cs</who>
    <bug_when>2014-09-18 18:02:35 +0000</bug_when>
    <thetext>Does that patch work for kinit from KF5?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471758</commentid>
    <comment_count>11</comment_count>
    <who name="Rex Dieter">rdieter</who>
    <bug_when>2014-09-18 18:04:08 +0000</bug_when>
    <thetext>I dont know, we&apos;ve only used it with kdelibs-4.x.  It theoretically shouldn&apos;t be too hard to port to kf5&apos;s kinit, it is fairly simple.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471923</commentid>
    <comment_count>12</comment_count>
    <who name="AnAkkk">anakin.cs</who>
    <bug_when>2014-09-19 17:19:02 +0000</bug_when>
    <thetext>Ok, will test it out later. Maybe someone can do a correct fix though since I&apos;ve explained the issue in my first post.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471938</commentid>
    <comment_count>13</comment_count>
    <who name="AnAkkk">anakin.cs</who>
    <bug_when>2014-09-19 20:43:24 +0000</bug_when>
    <thetext>After some testing and trying to understand the code, what I&apos;ve said in my first post isn&apos;t entirely true. 
Yes, it&apos;ll never pass the &quot;if (request-&gt;pid == pid)&quot; condition, but that part of code seem to be useless/unneeded anyway. 
My services are launched in this order:
1. baloo_file
2. krunner
3. plasmashell
etc.

I thought processDied was called on krunner, but it&apos;s actually on baloo_file (and I guess it&apos;s normal), krunner is launched fine.
The issue is still that mAutotimer isn&apos;t reset after krunner is ran, so the next service (plasmashell) isn&apos;t ran. I&apos;m still not sure why, trying to find out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471941</commentid>
    <comment_count>14</comment_count>
    <who name="AnAkkk">anakin.cs</who>
    <bug_when>2014-09-19 20:54:56 +0000</bug_when>
    <thetext>I&apos;ve checked which functions get called when it works, and it&apos;s actually KLauncher::slotNameOwnerChanged, which calls requestDone and reset mAutotimer.

This look like a Qt5 and/or DBus issue, and I don&apos;t know enough to debug this unfortunately. Since it works after restarting the DM, maybe it&apos;s because some dbus process is launched too late on the 1st run?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471943</commentid>
    <comment_count>15</comment_count>
    <who name="AnAkkk">anakin.cs</who>
    <bug_when>2014-09-19 21:06:48 +0000</bug_when>
    <thetext>I&apos;ll just mark this as a duplicate of the other one.

*** This bug has been marked as a duplicate of bug 328571 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>