konqueror embedded from busybox init

Yan Seiner yan at seiner.com
Thu Mar 9 13:00:51 UTC 2006


I am going to reply to provide closure, since the issue turns out to be 
non-busybox related....  (thanks to Stephen Warren, who provided me with 
the start of my chain of thought....)

walter harms wrote:

>
> you may took at look at dillo. (www.dillo.org)
> MUCH leaner.


Yes, but it doesn't provide flash and javascript, two things that I 
absolutely need....

>
>
>
> yan seiner wrote:
>
>> Rob Landley wrote:
>>
>>> On Wednesday 08 March 2006 4:58 pm, yan seiner wrote:
>>>  
>>>
>>>> First of all, apologies for cross-posting to both of these, but I am
>>>> somewhat (OK, totally) stupmed.
>>>>
>>>> I am running konqueror embedded, a browser based on KDE.  It is 
>>>> running
>>>> on top of Qt/E.
>>>>   
>>>
>>>
>>> Ooh, cool!
>>>
>>> http://www.konqueror.org/embedded/
>>>
>>> I should add that to the tiny utils page. :)
>>>  
>>>
>> It's the only fully-featured open-source embedded browser.... But it 
>> ain't so tiny. :-(  About 12 MB by the time you add up Qt/E and 
>> Konq/e....  But it compiles, and runs (well, mostly - except for this 
>> issue...)
>>
>>>  
>>>
>>>> If I launch it from the command line (busybox ash) , all is well.  But
>>>> if I start it from busybox init, it will crash several times before it
>>>> finally 'catches'.  This crash occurs in the same way if I start 
>>>> the box
>>>> cold, or if I kill the konqueror process the machine is completely
>>>> booted...
>>>>
>>>> The exact number of times it crashes varies; it appears to be 
>>>> around 3.
>>>> It crashes consistently at the point of launching the flash plugin.
>>>>   
>>>
>>>
>>> Sounds like a bug in the flash plugin.
>>>  
>>>
>> That doesn't explain why it runs from the command line and not from 
>> init....
>>
>>> Call it from a script that does sleep 1 first?
>>>  
>>>
>> I've tried that, as well as sticking in sleep() after each fork in 
>> konq/e, to see if it was that...
>>
>> I am beginning to suspect that it may be something with busybox httpd 
>> closing the connection before konq/e is ready for it...  Just from 
>> watching it, the crash happens about the time the httpd child goes 
>> away, a second after the flash movie starts.  Why it would only 
>> happen from init I don't know....
>>
>> I'll follow up on this on the konq list - but if someone could point 
>> out where I might try to stick in a sleep(1) into httpd to delay the 
>> closing of the connection I would be very grateful...
>
Anyway, konq/e forks and uses pipes to send information between the 
forked proceses.  At one point, it writes a small header followed by the 
full write.  On a small (eg embedded) system, there is no time for the 
receiving end to empty the buffer of the header before the full write, 
and the write fails if the full write is the size of the buffer.  konq/e 
fails to handle that properly, segfaulting after several attempts.

A short usleep between the header write and the full write seems to 
solve the issue...  (that also explains why it would sometimes work and 
sometimes not...)

--Yan



More information about the busybox mailing list