[Sugar-devel] "Another osbuild instance is running" error
Shraddha Barke
shraddha.6596 at gmail.com
Wed Dec 30 17:08:02 EST 2015
> On Wed, Dec 30, 2015 at 04:30:17AM +0530, Shraddha Barke wrote:
>> I am trying to build sugar on Ubuntu 15.04 laptop. After git clone
>> and cd into sugar-build I get this error-Another osbuild instance is
>> running on executing ./osbuild pull
>> I searched the internet and found 2 such threads but the issue wasn't
>> resolved.
>
> There's more than two such threads on sugar-devel at .
>
>> Is this a bug that needs fixing?
>
> Yes, it's a bug in osbuild, please fix it.
Yes I will else I won't be able to get started at all.
>
> You'll find the get_lock_file_path() returns a file path Add a print
> to find out what the file path is.
>
I added a print statement and the file path is
.../git/sugar-build/.lock-host
> You'll find the get_lock_file() returns a file.
>
> You'll see that clean() removes the file. clean() may not be executed
> if the builder is forced to stop.
>
> Therefore the file may remain even though there is no instance
> running.
>
> The error is a lie.
The OSError is incorrect?
>
> To fix the bug, you should store the pid in the file, from
> os.getpid(), and check that the pid exists on the system using
> os.kill(pid, 0)
>
> If the pid does not exist on the system, it is safe to os.unlink() the
> file and continue to acquire the lock.
>
Should I make changes in clean() by adding a check for os.kill or in
check_lock() ?
--
Kind Regards,
Shraddha
> --
> James Cameron
>
More information about the Sugar-devel
mailing list