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

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

    <bug>
          <bug_id>56864</bug_id>
          
          <creation_ts>2025-11-14 19:01:29 +0300</creation_ts>
          <short_desc>backend3 не отвечает на запрос в образе server minimal</short_desc>
          <delta_ts>2026-01-16 13:45:43 +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>alterator-module-backend3</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Белая Алёна">belayaav</reporter>
          <assigned_to name="Иван Савин">svn17</assigned_to>
          <cc>rider</cc>
    
    <cc>svn17</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>277205</commentid>
    <comment_count>0</comment_count>
    <who name="Белая Алёна">belayaav</who>
    <bug_when>2025-11-14 19:01:29 +0300</bug_when>
    <thetext>alterator-module-backend3-0.2.0-alt1
alterator-5.4.5-alt1

Alt Server 11.0 x86_64 minimal, обновленный до Sisyphus

Шаги воспроизведения:
1. Установить пакеты: 
alterator-module-backend3 alterator
2. Создать файл .backend для проверки и policy для него: 

# cat&gt;/etc/alterator/backends/system/bk3_1.backend&lt;&lt;EOF
type = &quot;Backend&quot;
module = &quot;backend3&quot;
name = &quot;exampleb&quot;
#interface = &quot;backend3.example1&quot;
interface = &quot;example1&quot;
action_id = &quot;ru.basealt.alterator&quot;
thread_limit = 1

[methods.menu]
backend3 = &quot;menu&quot;
stdout_strings = true
stdout_byte_limit = 7000000
thread_limit = 1
[methods.menu.environment._objects]
default = &quot;avail_modules&quot;
[methods.menu.environment.language]
default = &quot;ru_RU&quot;
[methods.menu.environment.action]
default = &quot;list&quot;
EOF

# cat&gt;/usr/share/polkit-1/actions/ru.basealt.alterator.backend.policy&lt;&lt;EOF
&lt;!DOCTYPE policyconfig PUBLIC
&quot;-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN&quot;
&quot;http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd&quot;&gt;
&lt;policyconfig&gt;
&lt;action id=&quot;ru.basealt.alterator&quot;&gt;
&lt;description&gt;Alterator Authentication dialogue&lt;/description&gt;
&lt;message&gt;ru.basealt.alterator requires authentication.&lt;/message&gt;
&lt;defaults&gt;
&lt;allow_any&gt;yes&lt;/allow_any&gt;
&lt;allow_inactive&gt;yes&lt;/allow_inactive&gt;
&lt;allow_active&gt;yes&lt;/allow_active&gt;
&lt;/defaults&gt;
&lt;/action&gt;
&lt;/policyconfig&gt;
EOF

Запросить информацию от метода menu:
# dbus-send --system --print-reply --dest=&apos;org.altlinux.alterator&apos;  &apos;/org/altlinux/alterator/exampleb&apos; org.altlinux.alterator.example1.menu dict:string:string:&quot;ui&quot;,&quot;qt&quot;,&quot;expert_mode&quot;,&quot;0&quot;


Результат:
Error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

Ожидаемый результат: список записей словаря в виде &quot;значение&quot;:&quot;ключ&quot;, например: 
method return time=1763042856.105183 sender=:1.145 -&gt; destination=:1.217 serial=26 reply_serial=2
   array [
      array [
         dict entry(
            string &quot;uri&quot;
            string &quot;/datetime/system&quot;
         )
         dict entry(
            string &quot;help&quot;
            string &quot;datetime&quot;
         )
		...
		
В образах: 
Alt Education 11.0 x86_64
Alt Workstation K 11.1.1 x86_64
Alt Workstation 11.1 x86_64
успешно приходит ответ в виде списка.

Воспроизводится в Р11</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>280292</commentid>
    <comment_count>1</comment_count>
    <who name="Иван Савин">svn17</who>
    <bug_when>2026-01-15 17:48:39 +0300</bug_when>
    <thetext>Это происходит из-за того, что не установлено других модулей альтератора. Метод &quot;avail_modules&quot; из backend3 файла &quot;menu&quot; в таком случае зависает. Установите ещё один модуль, и метод выполнится.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>280306</commentid>
    <comment_count>2</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2026-01-15 23:29:00 +0300</bug_when>
    <thetext>но лучше то всё-таки вернуть пустой список а не зависать</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>280326</commentid>
    <comment_count>3</comment_count>
    <who name="Иван Савин">svn17</who>
    <bug_when>2026-01-16 13:45:43 +0300</bug_when>
    <thetext>Да, но для этого надо исправить альтератор. alterator-module-backend3 ждёт ответ от backend3 файла (в данном случае /usr/lib/alterator/backend3/menu, это часть альтератора), чтобы распарсить его и дать ответ пользователю. Если от backend3 файла ответа нет, то пользователю возвращается ошибка.
Чтобы увидеть эту ошибку, нужно установить timeout для метода в alterator-module-backend3 меньший, чем время ожидания dbus-send.

[methods.menu]
backend3 = &quot;menu&quot;
stdout_strings = true
stdout_byte_limit = 7000000
thread_limit = 1
timeout = 5 &lt;---- вот так например

У alterator-module-backend3-0.2.0-alt1 был баг с timeout&apos;ом. Он исправлен в alterator-module-backend3-0.2.1-alt1.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>