[Reconnoiter-users] HTTPS Seg fault

Dan Di Spaltro dan.dispaltro at gmail.com
Mon Jul 20 04:50:20 EDT 2009


Just fired the compilation up on an Ubuntu 32bit machine and it works
well.  And I ran it with valgrind and only got a couple seemingly
minor errors.  I also spun up a vanilla ubuntu ec2 box 64bit and it
actually compiles and works fine!  So at this point I am guessing my
laptop has been the culprit this whole time.  So I copied over the
binaries from the other box, specifically just the http.so and it
works.

After it worked, I did ldd on my version of the file and the external
compiled version and they are both linking to the same stuff, so I am
not exactly sure why or where the error is happening here.

Then I tried to add a couple more checks and it started segfaulting.
This was the lowest amount of checks to get the segfault.  So I am
guessing something wonky is going on, because now I am back to the
original perceived problem, which is this:

serf_initiate(0x732b9b8,8.8.38.6)
serf_eventer_remove() => 11
serf_eventer_add() => 11, 35 [IOE]
serf_handler() => 11, 11 [I-E]

Here is my configuration:

   <check uuid="1b4e28ba-2fa1-11d2-883f-b9a761bde3aa"
target="8.8.38.5" module="http" timeout="5000" period="10000">
         <config>
           <url>https://labs.omniti.com/</url>
           <code>200</code>
         </config>
       </check>
    <check uuid="2b4e28ba-2fa1-11d2-883f-b9a761bde3aa"
target="8.8.38.6" module="http" timeout="5000" period="10000">
         <config>
           <url>https://www.gmail.com/</url>
           <code>200</code>
         </config>
       </check>
    <check uuid="3b4e28ba-2fa1-11d2-883f-b9a761bde3aa"
target="8.8.38.7" module="http" timeout="5000" period="10000">
         <config>
           <url>http://www.gmail.com/</url>
           <code>200</code>
         </config>
       </check>


On Sat, Jul 18, 2009 at 6:20 PM, Theo Schlossnagle<jesus at omniti.com> wrote:
> This is really weird.  I've run this on:
>
> Linux ubuild 2.6.24-24-xen #1 SMP Wed Apr 15 17:05:38 UTC 2009 x86_64
> GNU/Linux
>
> I see no pertinent valgrind warnings and get no crashes.  Same thing when I
> run serf_get from the serf test suite.
>
> On Jul 18, 2009, at 3:14 PM, Dan Di Spaltro wrote:
>
>> The error is raised on this codepath in serf, part of the
>> serf_debug__record_read function.
>>
>> /* Validate that the previous status value allowed for another read. */
>>   if (APR_STATUS_IS_EAGAIN(rs->last) /* ### or APR_EOF? */) {
>>       /* Somebody read when they weren't supposed to. Bail. */
>>       abort();
>>   }
>>
>> I compared your source again to serf_get.c and didn't see anything
>> crazy different on the allocation side apart from using the functions
>> that are for using your own polling library over using the apr stuff.
>> It does seem odd that serf_handler is getting called twice on my box
>> though.
>>
>> On Fri, Jul 17, 2009 at 2:58 PM, Theo Schlossnagle<jesus at omniti.com>
>> wrote:
>>>
>>> On Jul 17, 2009, at 4:54 PM, Dan Di Spaltro wrote:
>>>
>>>> Thanks for looking into this, I added that single check and heres what
>>>> I get, which is different then what ive been getting for the last 4
>>>> days.
>>>>
>>>> serf_initiate(0x6aca90,8.8.38.5)
>>>> serf_eventer_remove() => 11
>>>> serf_eventer_add() => 11, 35 [IOE]
>>>> serf_handler() => 11, 4 [-O-]
>>>> serf_handler() => 11, 4 [-O-]
>>>
>>> This is what I expected.  We register the handle for all possible events.
>>>  Once the connection completes, we see an "POLLOUT" like event indicating
>>> that the filedescriptor is writable which means we've connected
>>> successfully.  self_handle then passes that into the libserf stuff
>>> without
>>> output which should setup the SSL buffers.  Try it under valgrind too.
>>>  This
>>> could be a 64bit bug. :-(  We've had two such "bag on head" bug before.
>>>
>>> One in STOMP:
>>> https://labs.omniti.com/trac/reconnoiter/changeset/735
>>>
>>> And one me being a dufus:
>>> https://labs.omniti.com/trac/reconnoiter/changeset/716
>>>
>>>
>>> --
>>> Theo Schlossnagle
>>> http://omniti.com/is/theo-schlossnagle
>>> p: +1.443.325.1357 x201   f: +1.410.872.4911
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Dan Di Spaltro
>
> --
> Theo Schlossnagle
> http://omniti.com/is/theo-schlossnagle
> p: +1.443.325.1357 x201   f: +1.410.872.4911
>
>
>
>
>
>



-- 
Dan Di Spaltro



More information about the Reconnoiter-users mailing list