1 |
2017-08-31 4:47 GMT-03:00 Andrew Savchenko <bircoph@g.o>: |
2 |
|
3 |
> Hi, |
4 |
> |
5 |
> On Thu, 24 Aug 2017 18:27:22 -0300 Francisco Ares wrote: |
6 |
> > Hi, All. |
7 |
> > |
8 |
> > This is a rather special case, so I don't expect much, but who knows? |
9 |
> > |
10 |
> > I've built a Gentoo x86-64 system for an embedded application. |
11 |
> > |
12 |
> > Just after a lot of updates, which I am unable to track, it stopped |
13 |
> working |
14 |
> > as usual. |
15 |
> > |
16 |
> > There is the development system, fully loaded of a lot of packages used |
17 |
> for |
18 |
> > development, and the production system, that don't need all of those. |
19 |
> > |
20 |
> > There is a line in both systems in /etc/iniitab responsible for |
21 |
> auto-login |
22 |
> > the production system user and the programs we need running (in its |
23 |
> > ".bash_profile" and ".xinitrc"): |
24 |
> > |
25 |
> > c6:2345:respawn:/sbin/agetty -a production-user 38400 tty6 linux |
26 |
> > |
27 |
> > The development system starts a WindowMaker session, and the production |
28 |
> > system starts a program that controls the rest of the hardware of this |
29 |
> > embedded system, with an X11 graphical interface. That runs normally |
30 |
> when |
31 |
> > simulated at the development system. |
32 |
> > |
33 |
> > The development system runs smoothly. The production system, after |
34 |
> > removing the files from undesirable packages and creating a squashfs |
35 |
> image |
36 |
> > of the ripped-off root partition behaves strangely at boot: |
37 |
> > |
38 |
> > It shows the initialization messages as expected, but when the auto-login |
39 |
> > and the controller program start should take place, it completely stalls |
40 |
> up |
41 |
> > to I plug a USB keyboard and issue some times some of the key |
42 |
> combinations |
43 |
> > to change to a text console and back to X11 (Ctrl-Alt-F1 and |
44 |
> Ctrl-Alt-F6); |
45 |
> > only then the things resume as expected. |
46 |
> > |
47 |
> > As you might suspect, there is no keyboard for the production system ;-) |
48 |
> . |
49 |
> > |
50 |
> > As a matter of fact, I don't know where the stall take place, as when I |
51 |
> try |
52 |
> > to switch to a text console to see the logs, it switches back to X11 and |
53 |
> > starts our program. By the way, the logs just show that the events |
54 |
> > occurred at latter times than expected. |
55 |
> > |
56 |
> > Although the squashfs is read-only, some main directories are arranged |
57 |
> in a |
58 |
> > way that, using tmpfs mounts and unionfs with the read-only directory to |
59 |
> > the read-write tmpfs directory to that main directory provide a way of |
60 |
> > creating temporary files that has been working for a few years now. |
61 |
> > |
62 |
> > For instance, in "/etc/fstab": |
63 |
> > |
64 |
> > tmpfs /.etc.rw tmpfs defaults,mode=755 |
65 |
> > 0 0 |
66 |
> > union /etc unionfs |
67 |
> > default_permissions,allow_other,use_ino,nonempty,suid, |
68 |
> cow,dirs=/. |
69 |
> > etc.rw=rw:/.etc.ro=ro 0 0 |
70 |
> > |
71 |
> > And there is a "/.etc.ro" with a copy of all files present in regular |
72 |
> > "/etc" , a "/.etc.rw" directory to be mounted tmpfs, and the original |
73 |
> > "/etc" directory, that needs to be there at boot, even before mounting |
74 |
> all |
75 |
> > this. |
76 |
> > |
77 |
> > Does anyone have a clue? |
78 |
> |
79 |
> Try to dissect your problem. Start with removing squashfs and all |
80 |
> tmpfs/unionfs manipulations. Create the same image, but on "normal" |
81 |
> writable file system and see how it goes. It may be fs-related bug, |
82 |
> may be you removed too many files and some "undesired" packages are |
83 |
> actually mandatory. |
84 |
> |
85 |
> If you have some form on snapshots of your changes, you can try to |
86 |
> bisect them in a git bisect way. |
87 |
> |
88 |
> Another approach is to run X server (or any other app suspected as |
89 |
> a troublemaker) under strace (or attach strace to a running process) |
90 |
> and see what is going on. You will have a lot of low level |
91 |
> information and extensive filtering will be required; strace is |
92 |
> capable of that, but you will need to dig into its documentation. |
93 |
> |
94 |
> Best regards, |
95 |
> Andrew Savchenko |
96 |
> |
97 |
|
98 |
|
99 |
Hi All, |
100 |
|
101 |
After days and days struggling, I finally upgraded to the newest stable |
102 |
kernel and updated every package with a "emerge -e", just in case, twice! |
103 |
Then, rebuilt the kernel again. |
104 |
|
105 |
So, like a charm, everything got back to work as before. |
106 |
|
107 |
Unfortunately, will never know what piece of code that issue was. |
108 |
|
109 |
Thank you, and |
110 |
|
111 |
Best Regards, |
112 |
Francisco |