All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Fix TOCTOU issue with sstate mirror
@ 2014-08-09 22:43 Tyler Hall
  2014-08-09 22:43 ` [PATCH 1/1] lib/oeqa/selftest: Don't match log level in output Tyler Hall
  0 siblings, 1 reply; 3+ messages in thread
From: Tyler Hall @ 2014-08-09 22:43 UTC (permalink / raw)
  To: openembedded-core

When attempting to use sstate from a mirror, the siginfo file will be checked
twice: first when deciding whether to run the setscene task and again while
fetching in the setscene task. If the file is removed from the mirror between
those two checks, the setscene task will run and fail. This is acceptable since
since the real task will be run instead, but currently the fetcher will emit an
error message which causes bitbake to return a nonzero exit code. The build
completes successfully but appears to have failed.

This race has occurred several times in practice when using an http sstate
server that periodically prunes old files.

The simple fix provided here is to downgrade the internal fetcher error message
to a warning and let the do_fetch task continue to generate its error level
message.

This is one of two paches. First openembedded-core must be patched to ignore
the "Error:" prefix when scraping the log for this message. Then bitbake's log
level can change.

Tyler Hall (1):
  lib/oeqa/selftest: Don't match log level in output

 meta/lib/oeqa/selftest/bbtests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.0.3



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] lib/oeqa/selftest: Don't match log level in output
  2014-08-09 22:43 [PATCH 0/1] Fix TOCTOU issue with sstate mirror Tyler Hall
@ 2014-08-09 22:43 ` Tyler Hall
  0 siblings, 0 replies; 3+ messages in thread
From: Tyler Hall @ 2014-08-09 22:43 UTC (permalink / raw)
  To: openembedded-core

To facilitate changing the log level of the "Fetcher failure" message,
search only for the message without the "Error:" prefix.
---
 meta/lib/oeqa/selftest/bbtests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
index e765e36..68f97bd 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -102,7 +102,7 @@ class BitbakeTests(oeSelfTest):
         bitbake('-ccleanall man')
         self.delete_recipeinc('man')
         self.assertEqual(result.status, 1, msg='Command succeded when it should have failed')
-        self.assertTrue('ERROR: Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output)
+        self.assertTrue('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output)
         self.assertTrue('ERROR: Function failed: Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.' in result.output)
 
     @testcase(171)
-- 
2.0.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 0/1] Fix TOCTOU issue with sstate mirror
@ 2014-08-09 22:46 Tyler Hall
  0 siblings, 0 replies; 3+ messages in thread
From: Tyler Hall @ 2014-08-09 22:46 UTC (permalink / raw)
  To: bitbake-devel

When attempting to use sstate from a mirror, the siginfo file will be checked
twice: first when deciding whether to run the setscene task and again while
fetching in the setscene task. If the file is removed from the mirror between
those two checks, the setscene task will run and fail. This is acceptable since
since the real task will be run instead, but currently the fetcher will emit an
error message which causes bitbake to return a nonzero exit code. The build
completes successfully but appears to have failed.

This race has occurred several times in practice when using an http sstate
server that periodically prunes old files.

The simple fix provided here is to downgrade the internal fetcher error message
to a warning and let the do_fetch task continue to generate its error level
message.

This is one of two paches. First openembedded-core must be patched to ignore
the "Error:" prefix when scraping the log for this message. Then bitbake's log
level can change.

Tyler Hall (1):
  fetch2: Downgrade the fetch failure log to a warning

 lib/bb/fetch2/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.0.3



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-09 22:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-09 22:43 [PATCH 0/1] Fix TOCTOU issue with sstate mirror Tyler Hall
2014-08-09 22:43 ` [PATCH 1/1] lib/oeqa/selftest: Don't match log level in output Tyler Hall
2014-08-09 22:46 [PATCH 0/1] Fix TOCTOU issue with sstate mirror Tyler Hall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.