<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>32778</bug_id>
          
          <creation_ts>2016-11-21 18:53:17 +0300</creation_ts>
          <short_desc>journald failed to start after recent selinux update</short_desc>
          <delta_ts>2016-11-22 16:29:20 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>libselinux</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vladimir D. Seleznev">vseleznv</reporter>
          <assigned_to name="Anton Farygin">rider</assigned_to>
          <cc>aen</cc>
    
    <cc>darktemplar</cc>
    
    <cc>evg</cc>
    
    <cc>glebfm</cc>
    
    <cc>nbr</cc>
    
    <cc>rider</cc>
    
    <cc>shaba</cc>
    
    <cc>vladimir.didenko</cc>
    
    <cc>vseleznv</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>160079</commentid>
    <comment_count>0</comment_count>
    <who name="Vladimir D. Seleznev">vseleznv</who>
    <bug_when>2016-11-21 18:53:17 +0300</bug_when>
    <thetext># systemctl start systemd-journald
Job for systemd-journald.service failed because a fatal signal was delivered to the control process.
See &quot;systemctl status systemd-journald.service&quot; and &quot;journalctl -xe&quot; for details.

Если откатить libselinux до 1:2.3-alt1, то сервис journald успешно стартует.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160087</commentid>
    <comment_count>1</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2016-11-22 09:18:52 +0300</bug_when>
    <thetext>Как воспроизводить ? у меня journal прекрасно работает с новым libselinux.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160088</commentid>
    <comment_count>2</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2016-11-22 09:25:04 +0300</bug_when>
    <thetext>Воспроизвёл на машине с выключенным selinux.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160089</commentid>
    <comment_count>3</comment_count>
    <who name="Evgenii Terechkov">evg</who>
    <bug_when>2016-11-22 09:52:49 +0300</bug_when>
    <thetext>У меня на x86_64/systemd/un-def c выключенным SELinux после обновления но без перезапуска демонов проявилось после засыпания/просыпания машины. Проявилось смертью systemd-networkd сначала с SIGABRT, потом с SIGSYS. Позже умер с SIGSYS и systemd-hostnamed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160090</commentid>
    <comment_count>4</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2016-11-22 09:54:13 +0300</bug_when>
    <thetext>А включение selinux не помогает ? хотя бы без политики.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160091</commentid>
    <comment_count>5</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2016-11-22 10:05:28 +0300</bug_when>
    <thetext>Судя по логам journald запускается, но процесс systemd его прибивает:
Nov 22 09:23:18 my.host systemd-journald[253]: Received SIGTERM from PID 1 (systemd).

Кто-нибуть знает, зачем он это делает ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160092</commentid>
    <comment_count>6</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2016-11-22 10:19:17 +0300</bug_when>
    <thetext>2361 - это journald, запуск из под systemd

[pid  2361] statfs(&quot;/sys/fs/selinux&quot;, 0x7ffca0c32f20) = -1 ENOENT (No such file or directory)
[pid  2361] statfs(&quot;/selinux&quot;, {f_type=EXT2_SUPER_MAGIC, f_bsize=4096, f_blocks=28817674, f_bfree=4310618, f_bavail=2840993, f_files=7331840, f_ffree=6803083, f_fsid={1759202911, 2549185661}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_NOATIME}) = 0
[pid  2361] +++ killed by SIGSYS +++</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160093</commentid>
    <comment_count>7</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2016-11-22 10:20:07 +0300</bug_when>
    <thetext>Тоже самое запуск без systemd напрямую (/lib/systemd/systemd-journald)

2475  statfs(&quot;/sys/fs/selinux&quot;, 0x7ffc2b6cb740) = -1 ENOENT (No such file or directory)
2475  statfs(&quot;/selinux&quot;, {f_type=EXT2_SUPER_MAGIC, f_bsize=4096, f_blocks=28817674, f_bfree=4310265, f_bavail=2840640, f_files=7331840, f_ffree=6802971, f_fsid={1759202911, 2549185661}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_NOATIME}) = 0
2475  mount(&quot;proc&quot;, &quot;/proc&quot;, &quot;proc&quot;, 0, NULL) = -1 EBUSY (Device or resource busy)
2475  open(&quot;/proc/filesystems&quot;, O_RDONLY) = 3
2475  fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160094</commentid>
    <comment_count>8</comment_count>
    <who name="Evgenii Terechkov">evg</who>
    <bug_when>2016-11-22 10:22:03 +0300</bug_when>
    <thetext>А можно краткую инструкцию, как включить selinux без политики и ничего не сломать? Тогда смогу вечером попробовать, если ещё нужно будет.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160096</commentid>
    <comment_count>9</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2016-11-22 10:27:15 +0300</bug_when>
    <thetext>Если убрать в systemd-journald.service из фильров системных вызовов @mount то всё начинает работать.

Всё дело в этом изменении в апстриме libselinux:
commit 9df498884665d79474b79f0f30d1cd67df11bd3e
Author: Ben Shelton &lt;ben.shelton@ni.com&gt;
Date:   Wed Apr 15 15:56:57 2015 -0500

    libselinux: Mount procfs before checking /proc/filesystems
    
    In the case where the SELinux security module is not loaded in the
    kernel and it&apos;s early enough in the boot process that /proc has not yet
    been mounted, selinuxfs_exists() will incorrectly return 1, and
    selinux_init_load_policy() will print a message like this to the
    console:
    
    Mount failed for selinuxfs on /sys/fs/selinux:  No such file or directory
    
    To fix this, mount the procfs before attempting to open
    /proc/filesystems, and unmount it when done if it was initially not
    mounted.  This is the same thing that selinux_init_load_policy() does
    when reading /proc/cmdline.
    
    Signed-off-by: Ben Shelton &lt;ben.shelton@ni.com&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160098</commentid>
    <comment_count>10</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2016-11-22 10:36:36 +0300</bug_when>
    <thetext>Сейчас соберу исправление</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160101</commentid>
    <comment_count>11</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2016-11-22 11:05:16 +0300</bug_when>
    <thetext>libselinux-1:2.5-alt2 -&gt; sisyphus:

* Tue Nov 22 2016 Anton Farygin &lt;rider@altlinux&gt; 1:2.5-alt2
- upstream fixes for /proc mounting (closes: #32778)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160119</commentid>
    <comment_count>12</comment_count>
    <who name="Gleb F-Malinovskiy">glebfm</who>
    <bug_when>2016-11-22 16:29:20 +0300</bug_when>
    <thetext>Да, у меня так работает.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>