Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/systemd: journald should use volatile storage
@ 2015-03-01  9:10 Nathaniel Roach
  2015-03-01 20:44 ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Nathaniel Roach @ 2015-03-01  9:10 UTC (permalink / raw)
  To: buildroot

(By default)

This fixes https://bugs.busybox.net/show_bug.cgi?id=7892

Journald was attempting to write the logs to file before the
underlying file system was up. A proposed solution was to bring
/tmp up beforehand, but that did not always solve the issue.

In addition, since the logging directory was a tmpfs to begin with
(/var/log -> /tmp) this should save some cycles.

Signed-off-by: Nathaniel Roach <nroach44@gmail.com>
---
 package/systemd/0004-fix-journald-on-tmpfs.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 package/systemd/0004-fix-journald-on-tmpfs.patch

diff --git a/package/systemd/0004-fix-journald-on-tmpfs.patch b/package/systemd/0004-fix-journald-on-tmpfs.patch
new file mode 100644
index 0000000..c143e47
--- /dev/null
+++ b/package/systemd/0004-fix-journald-on-tmpfs.patch
@@ -0,0 +1,12 @@
+--- systemd-218.orig/src/journal/journald.conf
++++ systemd-218/src/journal/journald.conf
+@@ -11,7 +11,7 @@
+ # See journald.conf(5) for details
+ 
+ [Journal]
+-#Storage=auto
++Storage=volatile
+ #Compress=yes
+ #Seal=yes
+ #SplitMode=uid
+
-- 
2.1.4

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

* [Buildroot] [PATCH 1/1] package/systemd: journald should use volatile storage
  2015-03-01  9:10 [Buildroot] [PATCH 1/1] package/systemd: journald should use volatile storage Nathaniel Roach
@ 2015-03-01 20:44 ` Peter Korsgaard
  2015-03-02 17:13   ` Mike Williams
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2015-03-01 20:44 UTC (permalink / raw)
  To: buildroot

>>>>> "Nathaniel" == Nathaniel Roach <nroach44@gmail.com> writes:

 > (By default)
 > This fixes https://bugs.busybox.net/show_bug.cgi?id=7892

 > Journald was attempting to write the logs to file before the
 > underlying file system was up. A proposed solution was to bring
 > /tmp up beforehand, but that did not always solve the issue.

 > In addition, since the logging directory was a tmpfs to begin with
 > (/var/log -> /tmp) this should save some cycles.

 > Signed-off-by: Nathaniel Roach <nroach44@gmail.com>

Sorry, cannot reproduce this here. How do you see it exactly?

See bugtracker for details about my tests with
qemu_arm_versatile_defconfig.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 1/1] package/systemd: journald should use volatile storage
  2015-03-01 20:44 ` Peter Korsgaard
@ 2015-03-02 17:13   ` Mike Williams
  2015-07-26 22:19     ` Maxime Hadjinlian
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Williams @ 2015-03-02 17:13 UTC (permalink / raw)
  To: buildroot

On Sun, Mar 1, 2015 at 3:44 PM, Peter Korsgaard <peter@korsgaard.com> wrote:
>>>>>> "Nathaniel" == Nathaniel Roach <nroach44@gmail.com> writes:
>
>  > (By default)
>  > This fixes https://bugs.busybox.net/show_bug.cgi?id=7892
>
>  > Journald was attempting to write the logs to file before the
>  > underlying file system was up. A proposed solution was to bring
>  > /tmp up beforehand, but that did not always solve the issue.
>
>  > In addition, since the logging directory was a tmpfs to begin with
>  > (/var/log -> /tmp) this should save some cycles.
>
>  > Signed-off-by: Nathaniel Roach <nroach44@gmail.com>
>
> Sorry, cannot reproduce this here. How do you see it exactly?
>
> See bugtracker for details about my tests with
> qemu_arm_versatile_defconfig.
>

I recently started having this issue on my SAMA5 system and this patch
fixed it. It seems to be some sort of race condition; before this
patch it would occur about 1 out of 3 boots. I've since booted a dozen
times without an issue.

Mike

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

* [Buildroot] [PATCH 1/1] package/systemd: journald should use volatile storage
  2015-03-02 17:13   ` Mike Williams
@ 2015-07-26 22:19     ` Maxime Hadjinlian
  2015-07-27  2:27       ` Nathaniel Roach
  0 siblings, 1 reply; 6+ messages in thread
From: Maxime Hadjinlian @ 2015-07-26 22:19 UTC (permalink / raw)
  To: buildroot

Hi Nathaniel, Mike, all

On Mon, Mar 2, 2015 at 6:13 PM, Mike Williams <mike@mikebwilliams.com> wrote:
> On Sun, Mar 1, 2015 at 3:44 PM, Peter Korsgaard <peter@korsgaard.com> wrote:
>>>>>>> "Nathaniel" == Nathaniel Roach <nroach44@gmail.com> writes:
>>
>>  > (By default)
>>  > This fixes https://bugs.busybox.net/show_bug.cgi?id=7892
>>
>>  > Journald was attempting to write the logs to file before the
>>  > underlying file system was up. A proposed solution was to bring
>>  > /tmp up beforehand, but that did not always solve the issue.
This should never happens, the service that starts journald depends on
earlier services that mount the related filesystem. And even if they
are not present, it should be able to deal with it (I have a setup
where journald is started before the mountpoint where it should write
is mounted and I never had any problem with it).
>>
>>  > In addition, since the logging directory was a tmpfs to begin with
>>  > (/var/log -> /tmp) this should save some cycles.
>>
>>  > Signed-off-by: Nathaniel Roach <nroach44@gmail.com>
>>
>> Sorry, cannot reproduce this here. How do you see it exactly?
>>
>> See bugtracker for details about my tests with
>> qemu_arm_versatile_defconfig.
>>
>
> I recently started having this issue on my SAMA5 system and this patch
> fixed it. It seems to be some sort of race condition; before this
> patch it would occur about 1 out of 3 boots. I've since booted a dozen
> times without an issue.
I would really think the issue is elsewhere since you both have the
same board and Peter could not reproduce and neither can I with 4
different platform (3 are ARM based but so is the SAMA5).
>
> Mike
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 1/1] package/systemd: journald should use volatile storage
  2015-07-26 22:19     ` Maxime Hadjinlian
@ 2015-07-27  2:27       ` Nathaniel Roach
  2015-07-27  7:54         ` Maxime Hadjinlian
  0 siblings, 1 reply; 6+ messages in thread
From: Nathaniel Roach @ 2015-07-27  2:27 UTC (permalink / raw)
  To: buildroot

On 27 July 2015 6:19:00 am AWST, Maxime Hadjinlian <maxime.hadjinlian@gmail.com> wrote:
>Hi Nathaniel, Mike, all
>
>On Mon, Mar 2, 2015 at 6:13 PM, Mike Williams <mike@mikebwilliams.com>
>wrote:
>> On Sun, Mar 1, 2015 at 3:44 PM, Peter Korsgaard <peter@korsgaard.com>
>wrote:
>>>>>>>> "Nathaniel" == Nathaniel Roach <nroach44@gmail.com> writes:
>>>
>>>  > (By default)
>>>  > This fixes https://bugs.busybox.net/show_bug.cgi?id=7892
>>>
>>>  > Journald was attempting to write the logs to file before the
>>>  > underlying file system was up. A proposed solution was to bring
>>>  > /tmp up beforehand, but that did not always solve the issue.
>This should never happens, the service that starts journald depends on
>earlier services that mount the related filesystem. And even if they
>are not present, it should be able to deal with it (I have a setup
>where journald is started before the mountpoint where it should write
>is mounted and I never had any problem with it).
>>>
>>>  > In addition, since the logging directory was a tmpfs to begin
>with
>>>  > (/var/log -> /tmp) this should save some cycles.
>>>
>>>  > Signed-off-by: Nathaniel Roach <nroach44@gmail.com>
>>>
>>> Sorry, cannot reproduce this here. How do you see it exactly?
>>>
>>> See bugtracker for details about my tests with
>>> qemu_arm_versatile_defconfig.
>>>
>>
>> I recently started having this issue on my SAMA5 system and this
>patch
>> fixed it. It seems to be some sort of race condition; before this
>> patch it would occur about 1 out of 3 boots. I've since booted a
>dozen
>> times without an issue.
>I would really think the issue is elsewhere since you both have the
>same board and Peter could not reproduce and neither can I with 4
>different platform (3 are ARM based but so is the SAMA5).
>>
>> Mike
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>_______________________________________________
>buildroot mailing list
>buildroot at busybox.net
>http://lists.busybox.net/mailman/listinfo/buildroot

As noted in the bug I filed for this (on mobile so I can't link), this issue is caused by having "rw" in the kernel parameters. This causes journald to think it has persistent storage (because it is set to auto) and thus tries to write to a file system that isn't up.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150727/74db7902/attachment.html>

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

* [Buildroot] [PATCH 1/1] package/systemd: journald should use volatile storage
  2015-07-27  2:27       ` Nathaniel Roach
@ 2015-07-27  7:54         ` Maxime Hadjinlian
  0 siblings, 0 replies; 6+ messages in thread
From: Maxime Hadjinlian @ 2015-07-27  7:54 UTC (permalink / raw)
  To: buildroot

Hi Nathaniel,

On Mon, Jul 27, 2015 at 4:27 AM, Nathaniel Roach <nroach44@gmail.com> wrote:
> On 27 July 2015 6:19:00 am AWST, Maxime Hadjinlian
> <maxime.hadjinlian@gmail.com> wrote:
>>
>> Hi Nathaniel, Mike, all
>>
>> On Mon, Mar 2, 2015 at 6:13 PM, Mike Williams <mike@mikebwilliams.com>
>> wrote:
>>>
>>>  On Sun, Mar 1, 2015 at 3:44 PM, Peter Korsgaard <peter@korsgaard.com>
>>> wrote:
>>>>>>>>>
>>>>>>>>>  "Nathaniel" == Nathaniel Roach <nroach44@gmail.com> writes:
>>>>
>>>>
>>>>>  (By default)
>>>>>  This fixes https://bugs.busybox.net/show_bug.cgi?id=7892
>>>>
>>>>
>>>>>  Journald was attempting to write the logs to file before the
>>>>>  underlying file system was up. A proposed solution was to bring
>>>>>  /tmp up beforehand, but that did not always solve the issue.
>>
>> This should never happens, the service that starts journald depends on
>> earlier services that mount the related filesystem. And even if they
>> are not
>> present, it should be able to deal with it (I have a setup
>> where journald is started before the mountpoint where it should write
>> is mounted and I never had any problem with it).
>>>>
>>>>
>>>>>  In addition, since the logging directory was a tmpfs to begin with
>>>>>  (/var/log -> /tmp) this should save some cycles.
>>>>
>>>>
>>>>>  Signed-off-by: Nathaniel Roach <nroach44@gmail.com>
>>>>
>>>>
>>>>  Sorry, cannot reproduce this here. How do you see it exactly?
>>>>
>>>>  See bugtracker for
>>>> details about my tests with
>>>>  qemu_arm_versatile_defconfig.
>>>
>>>
>>>
>>>  I recently started having this issue on my SAMA5 system and this patch
>>>  fixed it. It seems to be some sort of race condition; before this
>>>  patch it would occur about 1 out of 3 boots. I've since booted a dozen
>>>  times without an issue.
>>
>> I would really think the issue is elsewhere since you both have the
>> same board and Peter could not reproduce and neither can I with 4
>> different platform (3 are ARM based but so is the SAMA5).
>>>
>>>
>>>  Mike
>>> ________________________________
>>>
>>>  buildroot mailing list
>>>  buildroot at busybox.net
>>>  http://lists.busybox.net/mailman/listinfo/buildroot
>>
>> ________________________________
>>
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>
>
> As noted in the bug I filed for this (on mobile so I can't link), this issue
> is caused by having "rw" in the kernel parameters. This causes journald to
> think it has persistent storage (because it is set to auto) and thus tries
> to write to a file system that isn't up.
Then the real issues beneath this, is to change /etc/fstab instead of
doing hocus pocus in inittab, I'll cook up a patch regarding that
which should fix your issue too.

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

end of thread, other threads:[~2015-07-27  7:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-01  9:10 [Buildroot] [PATCH 1/1] package/systemd: journald should use volatile storage Nathaniel Roach
2015-03-01 20:44 ` Peter Korsgaard
2015-03-02 17:13   ` Mike Williams
2015-07-26 22:19     ` Maxime Hadjinlian
2015-07-27  2:27       ` Nathaniel Roach
2015-07-27  7:54         ` Maxime Hadjinlian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox