[Buildroot] pseudo: remaining issues...

Gaël PORTAY gael.portay at savoirfairelinux.com
Wed Nov 23 05:44:20 UTC 2016


Yann,

On Tue, Nov 22, 2016 at 11:16:30PM +0100, Yann E. MORIN wrote:
> And we have another issue, that Lucille and Gaël just tracked down.
> 
> They are using a docker instance to run their Buildroot builds, and
> noticed that the pseudo DB was empty after a build. However, if they
> artificially added a little sleep at the end, to prevent the docker
> instance to terminate instantly, the pseudo DB was correctly saved.
> 
> That's becasue pesuedo spawns itself a server in the background, and
> that server is responsible for loading the DB, maintaining the internal
> state, and saving the DB.
> 
> However, the DB is saved aftrer the last client exits, adn it can t ake
> a bit of time, which is enought time for the docker instance to
> terminate, killing (-9) the remaining processes, of whihch the pseudo
> server, which then does not have a chance to save its DB.
> 
> 
> One solution to this issue would be for us to run our own pseudo server,
> adn terminat it ourselves, then wait for it, something along those lines:
> 
>     # Spawn our server
>     pseudo -f
>     pseudo_pid=$!
> 
>     # Run the actual comand
>     pseudo real-command
> 
>     # Kil and wait for the server
>     pseudo -S
>     wait $pseudo_pid
> 

I was thinking the same thing... spawning our own server to make sure it
terminates before the wrapper completion.

> 
> Thoughts? Tests? ;-)

After regarding the code of pseudo, the easiest workaround is to update the
wrapper script to do what you mentionned above.

I have suggested a patch named:
[PATCH] pseudo-wrapper: fix console issue

This works on my setup either with a traditional build (on host) or with our
docker wrapper.



More information about the buildroot mailing list