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

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

    <bug>
          <bug_id>2785</bug_id>
          
          <creation_ts>2003-07-27 21:46:18 +0400</creation_ts>
          <short_desc>rconfrontend при работе через stunnel получает от него SIGPIPE и завершается</short_desc>
          <delta_ts>2006-12-29 23:18:28 +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>rconf</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="dixinet">roberthainlain</reporter>
          <assigned_to name="Alexander Bokovoy">ab</assigned_to>
          <cc>mike</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2546</commentid>
    <comment_count>0</comment_count>
    <who name="dixinet">roberthainlain</who>
    <bug_when>2003-07-27 21:46:18 +0400</bug_when>
    <thetext>При неправильном задании пути при работе с ssl-версией(через stunnel), например &lt;a href=&quot;http://192.168.1.1:20081&quot;&gt;http://192.168.1.1:20081&lt;/a&gt; (а не https),т.е. просто при неправильной работе через ssl, stunnel обрывает соединение клиент(правильно), но также шлет rconfrontend SIGPIPE, обработчиков которого у того нет, в итоге он завершается.
---

---
1-ая часть(вывод strace), также в httpd.rb нет обработчика на SIGPIPE (вывод после strace)

10089 accept(4, {sa_family=AF_INET, sin_port=htons(32855), sin_addr=inet_addr(\&amp;quot;127.0.0.1\&amp;quot;)}, [16]) = 5
10089 fcntl64(5, F_GETFL)               = 0x2 (flags O_RDWR)
10089 fstat64(5, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
10089 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4028b000
10089 _llseek(5, 0, 0xbfffbfe0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
10089 fcntl64(5, F_GETFL)               = 0x2 (flags O_RDWR)
10089 fstat64(5, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
10089 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4028c000
10089 _llseek(5, 0, 0xbfffbfe0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
10089 read(5, 0x4028b000, 4096)         = -1 ECONNRESET (Connection reset by peer)
10089 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
10089 brk(0x8097000)                    = 0x8097000
10089 write(5, \&amp;quot;HTTP/1.1 200 OK\\r\\nContent-Type: t\&amp;quot;..., 116) = -1 EPIPE (Broken pipe)
10089 --- SIGPIPE (Broken pipe) @ 0 (0) ---
10089 sigreturn()                       = ? (mask now [])
10089 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
10089 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
10089 close(5)                          = 0
10089 munmap(0x4028c000, 4096)          = 0
10089 close(5)                          = -1 EBADF (Bad file descriptor)
10089 munmap(0x4028b000, 4096)          = 0
10089 close(4)                          = 0
10089 munmap(0x4028a000, 4096)          = 0
10089 close(4)                          = -1 EBADF (Bad file descriptor)
10089 munmap(0x40289000, 4096)          = 0
10089 _exit(-1)                         = ?

Выдержка из httpd.rb
class Httpd

  def initialize(dispatcher, host=\&apos;localhost\&apos;, port=20080)
    @dispatcher = dispatcher
    @socket = TCPServer.new(host, port)
     [\&amp;quot;SIGTERM\&amp;quot;, \&amp;quot;SIGHUP\&amp;quot;, \&amp;quot;SIGINT\&amp;quot;].each{ |sig|
       trap sig, lambda { shutdown }
     }
  end


</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10832</commentid>
    <comment_count>1</comment_count>
    <who name="Alexander Bokovoy">ab</who>
    <bug_when>2003-12-07 13:42:41 +0300</bug_when>
    <thetext>Будет исправлено позже</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44073</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2006-12-29 23:18:00 +0300</bug_when>
    <thetext>re</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44074</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2006-12-29 23:18:25 +0300</bug_when>
    <thetext>Боюсь, не будет исправлено вообще (orphaned).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>