Quantcast
Channel: Linux Device Hacking - Debian
Viewing all 26681 articles
Browse latest View live

Re: Debian on Dell Kace M300

$
0
0
Thanks Mike, this memory alignment thing on the M300 may be something that could also affect you guys running Debian.

See:
https://wiki.debian.org/ArmEabiFixes#word_accesses_must_be_aligned_to_a_multiple_of_their_size
and
https://www.kernel.org/doc/html/latest/arm/mem_alignment.html

It looks like by your output above that you are set to "0" which I believe is what my Alpine install defaulted to and was causing the problem I talked about in the mailing list thread I linked to.

"0" supposedly means "A user process performing an unaligned memory access will cause the kernel to print a message indicating process name, pid, pc, instruction, address, and the fault code." but if it was printing any messages I never saw them anywhere. The crappy part about it was that the apk command I was using (alpine's package manager) worked for some things, sort of worked for others, and didn't work at all for still others, but the command never actually caused a crash or seg fault or anything else that would be an _obvious_ problem. I'd rather have that then something that "sort of" works and leaves you wondering what else can't be trusted.

//edit, see also https://stackoverflow.com/questions/16548059/how-to-trap-unaligned-memory-access

I'd be curious to see if you did a:
echo 2 > /proc/cpu/alignment

let the system run for a while and cat the file periodically if you'd see fault numbers going up (and being corrected by the kernel) which I think would mean that at the current setting of 0, the faults were still there, just not being caught and what's worse, not being corrected.

I could be completely misunderstanding the situation and settings, I just know I ran into an issue and it looks like you are running with the same setting I was.

Re: Errors in Boot Log for Dell M300

$
0
0
>
> mkswap /swapfile1
>
> then swapon or reboot to get it to work.

Yes, of course.

> [ 26.688594] Adding 1048572k swap on
> /mnt/data/swapfile1. Priority:-2 extents:14
> across:1125440k SSFS

> Is that what should be expected? sda1 is 4GB for
> the rootfs, sda2 is the remainder of the 16GB SSD.

That is expected.

Re: ix2-200 boots USB but not HDD

$
0
0
Check your fstab. It should have:

LABEL=rootfs    /               ext3    noatime,errors=remount-ro 0 1

Re: Debian on Dell Kace M300

$
0
0
Here's my production M300:
root@Dell-M300:~# uptime
 16:43:36 up 11 days,  5:44,  1 user,  load average: 0.00, 0.00, 0.00
root@Dell-M300:~# cat /proc/cpu/alignment
User:		0
System:		3 (__fixup_a_pv_table+0x44/0x54)
Skipped:	0
Half:		0
Word:		3
DWord:		0
Multi:		0
User faults:	0 (ignored)

Runs Logitech Media Server and nothing else.

This has been running without a swap file; I configured one this morning.

The other M300 running with swap file, uptime 9 hrs:
root@m300-2:~# cat /proc/cpu/alignment
User:		0
System:		0 (0x0)
Skipped:	0
Half:		0
Word:		0
DWord:		0
Multi:		0
User faults:	0 (ignored)

Re: Debian on Dell Kace M300

$
0
0
sodface,

This box architecture is Armv5te, i.e Kirkwood. Same as other Kirkwood boxes that we have been supporting since kernel 3.16.x. So I dont think alignment is a problem at all.

Re: Errors in Boot Log for Dell M300

$
0
0
Mike,

So how was the reboot with serial console? With swap allocated, do you still see the error?

Re: Errors in Boot Log for Dell M300

$
0
0
I've had 2 or 3 reboots without serial. No issues from dmesg. I'll connect the serial tomorrow and let you know.

Re: Debian on Dell Kace M300

$
0
0
bodhi Wrote:
-------------------------------------------------------
> sodface,
>
> This box architecture is Armv5te, i.e Kirkwood.
> Same as other Kirkwood boxes that we have been
> supporting since kernel 3.16.x. So I dont think
> alignment is a problem at all.

Hi bodhi, you guys have way more knowledge on this than I do so I don't doubt you are correct, at least for debian, which is what this forum is about so I probably shouldn't be posting about Alpine here anyway. I'm definitely seeing memory alignment problems with this one application on Alpine though, as you can see from the number of errors in my output above. Mike's output from his one box indicates 3 errors so it doesn't seem to be a complete non-issue on debian but certainly nothing like I'm seeing. I think this is largely dependent on the application and how it's coded.

Re: "Bus Error"

$
0
0
bodhi and dancyran, forgive me for being new to the forum and butting in here beating the same drum as in the m300 thread, but the timing is such that I feel I should post the link the mailing list thread again and the fact that the memory alignment issue gave me a a "Bus error" also. Coincidence? Perhaps? Perhaps not?

https://lists.alpinelinux.org/~alpine/apk-tools/%3CCAGP1gyMH+GoXnGd3YQjg4piFYpMpNiHkC7PDO7BoHTSbYsP1Ug%40mail.gmail.com%3E

Read the whole thread for context but specifically see my latest post where a specific command gives me a Bus error:

localhost:~# apk list
Bus error

Re: Debian on Dell Kace M300

$
0
0
sodface,

> about so I probably shouldn't be posting about
> Alpine here anyway. I'm definitely seeing memory
> alignment problems with this one application on
> Alpine though, as you can see from the number of
> errors in my output above.

On the contrary, when you're out of idea to fix something, please post here. We welcome any Linux distro users. You should see a very long thread about booting FreeBSD here :) We will learn something from it.

> Mike's output from his
> one box indicates 3 errors so it doesn't seem to
> be a complete non-issue on debian but certainly
> nothing like I'm seeing. I think this is largely
> dependent on the application and how it's coded.

I did not recall Mike has "bus error" ? usually iirc that it is hardware problem, or running a binary that was compiled for a wrong architecture. If other binaries are running fine on Alpine on this box, and then just one binary that has bus error, then it itself is suspected.

Re: Debian on Dell Kace M300

$
0
0
FWIW, here's the alignment info from a Pogo E02 running latest Debian and samba:
root@BlackPogo:~# uptime
 03:28:46 up 7 days, 18:05,  1 user,  load average: 0.00, 0.00, 0.00
root@BlackPogo:~# cat /proc/cpu/alignment
User:		0
System:		0 (0x0)
Skipped:	0
Half:		0
Word:		0
DWord:		0
Multi:		0
User faults:	0 (ignored)

The M300 with the errors is running Logitech Media Server with Perl modules compiled by a LMS forum member for armel. Don't know if that means anything It'd s pretty big app I think. .

Re: ix2-200 boots USB but not HDD

$
0
0
@bodhi

Added the line to fstab, it was indeed missing. I still get kicked to initramfs prompt?!

Re: ix2-200 boots USB but not HDD

$
0
0
@damnit_,

> Added the line to fstab, it was indeed missing. I
> still get kicked to initramfs prompt?!

That would cover all necessary hooks to boot with rootfs label.

So I guess your rootfs has some peculiar settings in the init scripts that has prevent the rootfs label to be found. How did you create it? is this your own rootfs from way back, or did you use my released rootfs Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2?

Re: Errors in Boot Log for Dell M300

$
0
0
One boot with serial connected, no problem, Swap was recognized and mounted. dmesg looked norma.

Re: Errors in Boot Log for Dell M300

$
0
0
Hi Mike,

> One boot with serial connected, no problem, Swap
> was recognized and mounted. dmesg looked norma.

Cool! That's confirmed what I thought seeing the log.

Linux memory management has this quirk. Even though the box has a lot of RAM, during boot (and when it is really out of memory) it makes a difference if there is swap space. The explanation is a long and kind of make sense if we ever have time to discuss this.

Re: Debian on Dell Kace M300

$
0
0
bodhi Wrote:
-------------------------------------------------------
>We welcome any Linux
> distro users.

Thanks bodhi!

> I did not recall Mike has "bus error" ?

He didn't, but his /proc/cpu/alignment output from his m300 running LMS listed 3 alignment faults - no idea really how to interpret what caused them and as these are in the "system" category vs. the "user" category I'm guessing that these are corrected automatically by the kernel and the entries are just informational - as opposed to the user faults where you can control how faults are handled by echoing the various numeric options to /proc/cpu/alignment. ?

For the "user" category faults that I'm seeing on Alpine, I agree with you, these are software related and specific to applications which aren't coded to always perform aligned memory access (again, not sure if this the 100% accurate way to word it but you get my meaning).

What continues to nag me though is that it seems based on Mike's output that the debian image you guys are using defaults /proc/cpu/alignment to 0 for user faults (like my Alpine system is). I'm pretty sure then that you guys would also get alignment faults and strange application behavior depending on the software you might choose to use. That Mike has 0 user errors in his output could just be luck so far in other words. If he installed something new in the future, he could have issues.

I was trying to figure out if debian has been defaulting to doing something differently than Alpine which would explain why you guys haven't had issues with this before. I did find this old post:

https://lists.debian.org/debian-arm/2011/06/msg00072.html

One part of that post states:
"The default /proc/cpu/alignment mode seems to be 2 (fixup), on v6/v7,
priovided that the v6 unaligned access model (CR_U) is supported by the CPU:"

Which I think is related to the kernel, and not debian specifically. The cpu on the m300 is v5 right so might explain why it defaults to 0 (ignore) as seen in Mike's output? It was suggested in the top part of that post to add an alignment= kernel option to perform user fixup, so maybe that is one option to consider.

There are a few simple programs on github to induce/test memory alignment faults so someone could pick one and test with it and we could compare results. I'm planning on doing it for Alpine but I'll be compiling for musl libc so I don't believe the resulting binary will run on your glbic debian builds.

Re: ix2-200 boots USB but not HDD

Re: Errors in Boot Log for Dell M300

$
0
0
It just feels better knowing it is there. Sort of like a favorite toy that it sleeps with.

Re: Errors in Boot Log for Dell M300

$
0
0
Second boot witth swap on and serial connected failed. Filled the PuTTy buffer with this repeating message until I killed the power. So, I missed where it started:
Begin: Running /scripts/local-block ... done.
blkid: relocation error: /lib/arm-linux-gnueabi/libc.so.6: symbol __pointer_chk_guard version GLIBC_PRIVATE not defined in file ld-linux.so.3 with link time reference
sleep: relocation error: /lib/arm-linux-gnueabi/libc.so.6: symbol __pointer_chk_guard version GLIBC_PRIVATE not defined in file ld-linux.so.3 with link time reference
cat: relocation error: /lib/arm-linux-gnueabi/libc.so.6: symbol __pointer_chk_guard version GLIBC_PRIVATE not defined in file ld-linux.so.3 with link time reference

Booted again and this time successful.
Begin: Running /scripts/local-block
does not appear in the successful boot log.

Found this:
https://tipstricks.itmatrix.eu/solving-the-running-scripts-local-block-loop-while-booting-in-linux/

And this:
local-block issue

Re: Errors in Boot Log for Dell M300

$
0
0
mikeh49 Wrote:
-------------------------------------------------------
> It just feels better knowing it is there. Sort of
> like a favorite toy that it sleeps with.

:)) right. The some paging out activity occured during boot does not like no swap space.
Viewing all 26681 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>