y fails to start but gives no useful error message

View: New views
9 Messages — Rating Filter:   Alert me  

Re: y fails to start but gives no useful error message

by Kristian Mueller :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jerrit

On So, 2006-01-22 at 22:09 -0500, Jerrit Erickson wrote:
> 187           else if (pid != 0)
> 192               close (pipedes[1]);
> 197               ssize_t ret = read (pipedes[0], returns, sizeof (int) * 2);
> 198               if (ret > 0)
> 217                   if (ret == 0 || errno == EPIPE)
> 219                       fprintf (stderr, "Y: server exited before starting up\n");
> Y: server exited before starting up

it seems, that you've got a problem creating the pipe. I don't know the
source of Y but maybe you can provide information about the file it
happens in and I can have a look at the pipe creation part.

I am not shure if we have multitrading here - at least in your strace
output you see it is a forked process.

Hmm, wait:
Maybe the indention is missleading here, and we are past the (ret > 0)
then it could be a problem in the parent process. Meaning that the child
process (which would be the server) just died.

In that case you have to find out, why the child process has finished. -
maybe you could debug using DDD. And maybe you have the font problem
there. I don't know the code.


hope that helps

Kristian



y fails to start but gives no useful error message

by Jerrit Erickson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm still using the old 0.2.1 release, and I've gotten it to work on
other boxes using X11 before, but on my latest try I get only:

Y: server exited before starting up

The same thing happens whether I use the startY script or directly run
the Y binary. The box in question doesn't have X on it, but I've tried
both the fbcon and SDL drivers and messed with the config files some
with no results. I ran strace Y, but nothing appears wrong in the
output until the very end:

fork()                                  = 15760
close(5)                                = 0
read(4, "", 8)                          = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
write(2, "Y: server exited before starting"..., 36Y: server exited
before starting up
) = 36
exit_group(1)                           =?


I'd like to solve this myself if I can, but what's the best way to
debug Y? I don't know enough about threaded apps to go any further.
Thanks!


Re: y fails to start but gives no useful error message

by Jerrit Erickson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If it helps any, I stepped through it from main until exit with gdb.
There's no mention of the fonts dir, which I know was the usual
problem behind this error. I don't understand what it's testing for,
but at least this is more detailed than strace.

187           else if (pid != 0)
(gdb) step
192               close (pipedes[1]);
(gdb) step
197               ssize_t ret = read (pipedes[0], returns, sizeof (int) * 2);
(gdb) step
198               if (ret > 0)
(gdb) step
217                   if (ret == 0 || errno == EPIPE)
(gdb) step
219                       fprintf (stderr, "Y: server exited before
starting up\n");
(gdb) step
Y: server exited before starting up

On 1/22/06, Jerrit Erickson <jerrit@...> wrote:

> I'm still using the old 0.2.1 release, and I've gotten it to work on
> other boxes using X11 before, but on my latest try I get only:
>
> Y: server exited before starting up
>
> The same thing happens whether I use the startY script or directly run
> the Y binary. The box in question doesn't have X on it, but I've tried
> both the fbcon and SDL drivers and messed with the config files some
> with no results. I ran strace Y, but nothing appears wrong in the
> output until the very end:
>
> fork()                                  = 15760
> close(5)                                = 0
> read(4, "", 8)                          = 0
> --- SIGCHLD (Child exited) @ 0 (0) ---
> write(2, "Y: server exited before starting"..., 36Y: server exited
> before starting up
> ) = 36
> exit_group(1)                           =?
>
>
> I'd like to solve this myself if I can, but what's the best way to
> debug Y? I don't know enough about threaded apps to go any further.
> Thanks!
>


Parent Message unknown Re: Re: y fails to start but gives no useful error message

by Jerrit Erickson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm not entirely sure what I did differently this time, but I got it
to start and background. My startY is modified to tell me how far it's
getting...

localhost ~ # ./bin/startY
Using config /root/etc/Y/server.conf
PID is 31276
Display socket is unix:/tmp/.Y-unix/31276
Starting yiterm...
Should have opened a yiterm by now...

And the appropriate processes appear in ps:
root     31276  0.1  0.7   7060  3860 ?        Ss   04:19   0:00
/root/bin/Y --emit-pid --config /root/etc/Y/
root     31277  0.0  0.4   3768  2056 pts/0    S    04:19   0:00
/root/bin/yiterm
root     31278  0.0  0.2   2212  1256 pts/1    Ss+  04:19   0:00  \_ -/bin/bash

But I get only a my console, Y doesn't appear. So I look for errors:

localhost ~ # grep 31276 /var/log/syslog
Jan 23 04:19:01 localhost Y[31276]: Error: ykbLoadMapSet: Error
loading keymap /root/etc/Y/keymaps/us.ykb: No such file or directory
Jan 23 04:19:01 localhost Y[31276]: Error: initialise: sdl: Unable to
init: No available video device
Jan 23 04:19:01 localhost Y[31276]: clientRegister:116: Registering
client with ID: 1
Jan 23 04:19:01 localhost Y[31276]: clientAddObject:211: Adding object
2 [Window] to client 1
Jan 23 04:19:01 localhost Y[31276]: clientAddObject:211: Adding object
3 [Console] to client 1


I built libsdl myself using only the --enable-video-fbcon option to
configure, and framebuffer itself is most cerntainly working. So now
it's an SDL problem of some sort, not a problem with Y. For what it's
worth, I can get the "yellow lines" screen if I switch to the fbcon
driver. Have I missed something with the SDL setup? The mailing list
archives don't seem to mention Y starting cleanly but without any
video.

On 1/22/06, Kristian Mueller <Craps@...> wrote:

> Hi Jerrit
>
> On So, 2006-01-22 at 22:09 -0500, Jerrit Erickson wrote:
> > 187           else if (pid != 0)
> > 192               close (pipedes[1]);
> > 197               ssize_t ret = read (pipedes[0], returns, sizeof (int) * 2);
> > 198               if (ret > 0)
> > 217                   if (ret == 0 || errno == EPIPE)
> > 219                       fprintf (stderr, "Y: server exited before starting up\n");
> > Y: server exited before starting up
>
> it seems, that you've got a problem creating the pipe. I don't know the
> source of Y but maybe you can provide information about the file it
> happens in and I can have a look at the pipe creation part.
>
> I am not shure if we have multitrading here - at least in your strace
> output you see it is a forked process.
>
> Hmm, wait:
> Maybe the indention is missleading here, and we are past the (ret > 0)
> then it could be a problem in the parent process. Meaning that the child
> process (which would be the server) just died.
>
> In that case you have to find out, why the child process has finished. -
> maybe you could debug using DDD. And maybe you have the font problem
> there. I don't know the code.
>
>
> hope that helps
>
> Kristian
>
>


Re: Re: y fails to start but gives no useful error message

by Kristian Mueller :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jerrit

On Mo, 2006-01-23 at 18:00 -0500, Jerrit Erickson wrote:
> [..] We/I really ought to be a handbook for this stuff.
> Something along the lines of life with qmail or the gentoo handbooks
> that walks through a setup from scratch, in painstaking detail, just
> to get new people running Y without having to go through this sort of
> thing.

That sounds good. Maybe you can put that article into the new Wiki?


Kristian



Re: Re: y fails to start but gives no useful error message

by Jerrit Erickson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I got the framebuffer working by changing the color depth for the mode
I was using. The geometry line has five numbers in it, and only one
looked like a color depth (was set to 8), so I changed it to 32 and
suddenly video worked. It's not obvious how to define one's own
geometry and timings lines for a mode; I had to pull the fb.modes file
from another machine  and use trial and error. It'd have been nice if
there had at least been a comment in the file defining what the
numbers mean. Now, even with the input device interface stuff all
compiled into the kernel, and the evdev driver loaded, I have no
keyboard or mouse in fb mode.

Back to SDL, it turns out the configure script wasn't finding my
perfectly legit fbcon setup and so wasn't enabling fb support no
matter what flags I passed it. I ended up taking the relevant tests
out of the SDL configure script entirely and just left in the variable
it sets, manually declaring it to be yes. This got fb support into SDL
at last, and the SDL driver now works well enough to draw the light
blue screen before hanging. If nothing else, this proves that SDL
should have been able to configure the fb video driver on its own... I
am at a loss as to why I had to force it.

In both cases, there's a real lack of clear documentation for things
that Y relies on. We/I really ought to be a handbook for this stuff.
Something along the lines of life with qmail or the gentoo handbooks
that walks through a setup from scratch, in painstaking detail, just
to get new people running Y without having to go through this sort of
thing.

On 1/22/06, Jerrit Erickson <jerrit@...> wrote:

> I'm not entirely sure what I did differently this time, but I got it
> to start and background. My startY is modified to tell me how far it's
> getting...
>
> localhost ~ # ./bin/startY
> Using config /root/etc/Y/server.conf
> PID is 31276
> Display socket is unix:/tmp/.Y-unix/31276
> Starting yiterm...
> Should have opened a yiterm by now...
>
> And the appropriate processes appear in ps:
> root     31276  0.1  0.7   7060  3860 ?        Ss   04:19   0:00
> /root/bin/Y --emit-pid --config /root/etc/Y/
> root     31277  0.0  0.4   3768  2056 pts/0    S    04:19   0:00
> /root/bin/yiterm
> root     31278  0.0  0.2   2212  1256 pts/1    Ss+  04:19   0:00  \_ -/bin/bash
>
> But I get only a my console, Y doesn't appear. So I look for errors:
>
> localhost ~ # grep 31276 /var/log/syslog
> Jan 23 04:19:01 localhost Y[31276]: Error: ykbLoadMapSet: Error
> loading keymap /root/etc/Y/keymaps/us.ykb: No such file or directory
> Jan 23 04:19:01 localhost Y[31276]: Error: initialise: sdl: Unable to
> init: No available video device
> Jan 23 04:19:01 localhost Y[31276]: clientRegister:116: Registering
> client with ID: 1
> Jan 23 04:19:01 localhost Y[31276]: clientAddObject:211: Adding object
> 2 [Window] to client 1
> Jan 23 04:19:01 localhost Y[31276]: clientAddObject:211: Adding object
> 3 [Console] to client 1
>
>
> I built libsdl myself using only the --enable-video-fbcon option to
> configure, and framebuffer itself is most cerntainly working. So now
> it's an SDL problem of some sort, not a problem with Y. For what it's
> worth, I can get the "yellow lines" screen if I switch to the fbcon
> driver. Have I missed something with the SDL setup? The mailing list
> archives don't seem to mention Y starting cleanly but without any
> video.
>
> On 1/22/06, Kristian Mueller <Craps@...> wrote:
> > Hi Jerrit
> >
> > On So, 2006-01-22 at 22:09 -0500, Jerrit Erickson wrote:
> > > 187           else if (pid != 0)
> > > 192               close (pipedes[1]);
> > > 197               ssize_t ret = read (pipedes[0], returns, sizeof (int) * 2);
> > > 198               if (ret > 0)
> > > 217                   if (ret == 0 || errno == EPIPE)
> > > 219                       fprintf (stderr, "Y: server exited before starting up\n");
> > > Y: server exited before starting up
> >
> > it seems, that you've got a problem creating the pipe. I don't know the
> > source of Y but maybe you can provide information about the file it
> > happens in and I can have a look at the pipe creation part.
> >
> > I am not shure if we have multitrading here - at least in your strace
> > output you see it is a forked process.
> >
> > Hmm, wait:
> > Maybe the indention is missleading here, and we are past the (ret > 0)
> > then it could be a problem in the parent process. Meaning that the child
> > process (which would be the server) just died.
> >
> > In that case you have to find out, why the child process has finished. -
> > maybe you could debug using DDD. And maybe you have the font problem
> > there. I don't know the code.
> >
> >
> > hope that helps
> >
> > Kristian
> >
> >
>


Re: Re: y fails to start but gives no useful error message

by Jerrit Erickson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 1/23/06, Kristian Mueller <Kristian-M@...> wrote:

> Hi Jerrit
>
> On Mo, 2006-01-23 at 18:00 -0500, Jerrit Erickson wrote:
> > [..] We/I really ought to be a handbook for this stuff.
> > Something along the lines of life with qmail or the gentoo handbooks
> > that walks through a setup from scratch, in painstaking detail, just
> > to get new people running Y without having to go through this sort of
> > thing.
>
> That sounds good. Maybe you can put that article into the new Wiki?
Sure.

>
>
> Kristian
>
>


Re: Re: y fails to start but gives no useful error message

by Jerrit Erickson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The fbdev stuff works now. I wrote a script to autogenerate a vanilla
fb.modes file in case I ever have to do this again... The display
looks great at 1024x768x32. Repaints rather slowly considering there's
no load on the box, but I'm assuming the kernel fbcon driver just
doesn't refresh often enough to look snappy.

I got the mouse and keyboard event stuff to work, as in I can cat
/dev/input/event0 and get keyboard nonsense, and mouse nonsense from
event1. The mouse works in Y, so I can drag windows around and such,
but the keyboard doesn't work. I know it's not the event interface
itself since that's tested. Keymap us or gb makes no difference.

I would have looked to see if my keyboard output was still being
routed to tty1, but attempting to switch tty's after Y has started
causes the screen to turn into white lines and stop repainting.
Doesn't crash the whole box, I can still log in on tty2 or ssh, but
working blind is no fun. This isn't a one time glitch, it happens
every time and only a reboot will clear it.

So, two things. Has anyone else had trouble with the keyboard when
using evdev driver? And is the tty switching thing a problem for
anyone else?

On 1/23/06, Jerrit Erickson <jerrit@...> wrote:

> On 1/23/06, Kristian Mueller <Kristian-M@...> wrote:
> > Hi Jerrit
> >
> > On Mo, 2006-01-23 at 18:00 -0500, Jerrit Erickson wrote:
> > > [..] We/I really ought to be a handbook for this stuff.
> > > Something along the lines of life with qmail or the gentoo handbooks
> > > that walks through a setup from scratch, in painstaking detail, just
> > > to get new people running Y without having to go through this sort of
> > > thing.
> >
> > That sounds good. Maybe you can put that article into the new Wiki?
> Sure.
>
> >
> >
> > Kristian
> >
> >
>


Re: Re: y fails to start but gives no useful error message

by Michael Latiolais :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Both the keyboard and mouse work fine for me in fbdev mode.

Jerrit Erickson wrote:

>The fbdev stuff works now. I wrote a script to autogenerate a vanilla
>fb.modes file in case I ever have to do this again... The display
>looks great at 1024x768x32. Repaints rather slowly considering there's
>no load on the box, but I'm assuming the kernel fbcon driver just
>doesn't refresh often enough to look snappy.
>
>I got the mouse and keyboard event stuff to work, as in I can cat
>/dev/input/event0 and get keyboard nonsense, and mouse nonsense from
>event1. The mouse works in Y, so I can drag windows around and such,
>but the keyboard doesn't work. I know it's not the event interface
>itself since that's tested. Keymap us or gb makes no difference.
>
>I would have looked to see if my keyboard output was still being
>routed to tty1, but attempting to switch tty's after Y has started
>causes the screen to turn into white lines and stop repainting.
>Doesn't crash the whole box, I can still log in on tty2 or ssh, but
>working blind is no fun. This isn't a one time glitch, it happens
>every time and only a reboot will clear it.
>
>So, two things. Has anyone else had trouble with the keyboard when
>using evdev driver? And is the tty switching thing a problem for
>anyone else?
>
>On 1/23/06, Jerrit Erickson <jerrit@...> wrote:
>  
>
>>On 1/23/06, Kristian Mueller <Kristian-M@...> wrote:
>>    
>>
>>>Hi Jerrit
>>>
>>>On Mo, 2006-01-23 at 18:00 -0500, Jerrit Erickson wrote:
>>>      
>>>
>>>>[..] We/I really ought to be a handbook for this stuff.
>>>>Something along the lines of life with qmail or the gentoo handbooks
>>>>that walks through a setup from scratch, in painstaking detail, just
>>>>to get new people running Y without having to go through this sort of
>>>>thing.
>>>>        
>>>>
>>>That sounds good. Maybe you can put that article into the new Wiki?
>>>      
>>>
>>Sure.
>>
>>    
>>
>>>Kristian
>>>
>>>
>>>      
>>>
>
>
>
>  
>


LightInTheBox - Buy quality products at wholesale price!