9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] mk results in rc: suicide:
@ 2024-07-04 13:43 Marco Feichtinger
  2024-07-04 14:27 ` Alexander Kapshuk
  0 siblings, 1 reply; 15+ messages in thread
From: Marco Feichtinger @ 2024-07-04 13:43 UTC (permalink / raw)
  To: 9fans

Trying to compile a kernel on a local fossil machine,
I get following errors during the build
        rc: 1844: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
        mk: 8c -I../boot -FTVw ../boot/printstub.c : exit status=rc 1844: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9

At the same time /dev/kprint outputs 
        1844 rc: checked 20 page table entries

Every time i retried to compile, that error comes up, but on different steps during the build.
It even happens during 'mk clean'.

One time i even got
        rc 1148: suicide: sys: trap: general protection violation pc=0x0000744c
        mk: 8c -I../boot -FTVw ../port/print.c: exit status=rc 1148: suicide: sys: trap: general protection violation pc=0x0000744c

What do these error mean?

-marco


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-Mf907951987cf14e1b45d4b28
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] mk results in rc: suicide:
  2024-07-04 13:43 [9fans] mk results in rc: suicide: Marco Feichtinger
@ 2024-07-04 14:27 ` Alexander Kapshuk
  2024-07-04 15:19   ` wb.kloke
  0 siblings, 1 reply; 15+ messages in thread
From: Alexander Kapshuk @ 2024-07-04 14:27 UTC (permalink / raw)
  To: marco; +Cc: 9fans

On Thu, Jul 4, 2024 at 4:44 PM Marco Feichtinger <marco@germteig.com> wrote:
> 
> Trying to compile a kernel on a local fossil machine,
> I get following errors during the build
>         rc: 1844: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
>         mk: 8c -I../boot -FTVw ../boot/printstub.c : exit status=rc 1844: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
> 
> At the same time /dev/kprint outputs
>         1844 rc: checked 20 page table entries
> 
> Every time i retried to compile, that error comes up, but on different steps during the build.
> It even happens during 'mk clean'.
> 
> One time i even got
>         rc 1148: suicide: sys: trap: general protection violation pc=0x0000744c
>         mk: 8c -I../boot -FTVw ../port/print.c: exit status=rc 1148: suicide: sys: trap: general protection violation pc=0x0000744c
> 
> What do these error mean?
> 
> -marco
> 

Inspecting the process in the debugger might be insightful.
The Debugging section of https://9p.io/sys/doc/comp.pdf demonstrates
how to do it, and the error message exemplified is very similar to
what you got.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-Mfb345e61d3b891c4ee4ba725
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] mk results in rc: suicide:
  2024-07-04 14:27 ` Alexander Kapshuk
@ 2024-07-04 15:19   ` wb.kloke
  2024-07-04 18:44     ` Marco Feichtinger
  0 siblings, 1 reply; 15+ messages in thread
From: wb.kloke @ 2024-07-04 15:19 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 267 bytes --]

The symptoms look like disk full error.
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M5f914074957df945a1b6432a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 761 bytes --]

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

* Re: [9fans] mk results in rc: suicide:
  2024-07-04 15:19   ` wb.kloke
@ 2024-07-04 18:44     ` Marco Feichtinger
  2024-07-04 19:54       ` Dave Eckhardt
  0 siblings, 1 reply; 15+ messages in thread
From: Marco Feichtinger @ 2024-07-04 18:44 UTC (permalink / raw)
  To: 9fans

Thanks for the hints.

I don't believe that this is a disk full error,
since it's a fresh install on a 16GB SATADOM.

Now following crash during mk:
       rc: 2819: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
       mk: 8c -FTVw pcf.rootc.c : exit status=rc 2819: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9

So I tried acid.
        % acid 2819
        /proc/2819/text:386 plan 9 executable
        /sys/lib/acid/port
        /sys/lib/acid/386
        acid: src(0x0000b5d9)
        /sys/src/cmd/rc/plan9.c:476
                471                     int n;
                472
                473                     if(f<0 || f>=NFD)
                474                             return 0;
                475             Again:
                >476            if(dir[f].i==dir[f].n){ /* read */
                477                             free(dir[f].dbuf);
                478                             dir[f].dbuf = 0;
                479                             n = dirread(f, &dir[f].dbuf);
                480                             if(n>0){
                481                                     if(onlydirs){
        acid: stk()
        <stdin>:2: (error) no stack frame: './acid' file does not exist

I have no idea what that means.
Also, I don't understand acid well enough to use correctly, so i need to play more with it.

What's interesting is, when I set the window to 'noscroll', run mk, and manually 
scroll down the window, I get the kernel build without crashing.
If I scroll down too fast, it crashes.

-marco



------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M36a7c66c644662bf6ec85728
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] mk results in rc: suicide:
  2024-07-04 18:44     ` Marco Feichtinger
@ 2024-07-04 19:54       ` Dave Eckhardt
  2024-07-04 19:57         ` Charles Forsyth
  0 siblings, 1 reply; 15+ messages in thread
From: Dave Eckhardt @ 2024-07-04 19:54 UTC (permalink / raw)
  To: 9fans

If it were my machine I would probably run a RAM tester overnight.

Dave Eckhardt

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M02fac44b503b2dfc5c1be904
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] mk results in rc: suicide:
  2024-07-04 19:54       ` Dave Eckhardt
@ 2024-07-04 19:57         ` Charles Forsyth
  2024-07-05  1:32           ` ibrahim via 9fans
  2024-07-05  1:47           ` ibrahim via 9fans
  0 siblings, 2 replies; 15+ messages in thread
From: Charles Forsyth @ 2024-07-04 19:57 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 432 bytes --]

yes, i'd suspect RAM or RAM setup

On Thu, 4 Jul 2024 at 20:55, Dave Eckhardt <davide+p9@cs.cmu.edu> wrote:

> If it were my machine I would probably run a RAM tester overnight.
> 
> Dave Eckhardt

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M1d97d3b43535c1d4014c1d9f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1645 bytes --]

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

* Re: [9fans] mk results in rc: suicide:
  2024-07-04 19:57         ` Charles Forsyth
@ 2024-07-05  1:32           ` ibrahim via 9fans
  2024-07-05  1:47           ` ibrahim via 9fans
  1 sibling, 0 replies; 15+ messages in thread
From: ibrahim via 9fans @ 2024-07-05  1:32 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 633 bytes --]

I made this experience some time ago and suspect one of your static libraries didn't get rebuild. To verify this have a look in your /386/lib folder and verify the timestamp of your libraries. If you find the culprit manually change to that library and do "mk nuke ; mk ; mk install".

I would guess you tried to add a system call to the kernel and your libc wasn't rebuild - but thats only a guess.


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M87a7792e7cf56899ef10fb12
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1161 bytes --]

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

* Re: [9fans] mk results in rc: suicide:
  2024-07-04 19:57         ` Charles Forsyth
  2024-07-05  1:32           ` ibrahim via 9fans
@ 2024-07-05  1:47           ` ibrahim via 9fans
  2024-07-07 14:15             ` Marco Feichtinger
  1 sibling, 1 reply; 15+ messages in thread
From: ibrahim via 9fans @ 2024-07-05  1:47 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 581 bytes --]

To avoid such problems while rebuilding kernels + libraries + commands you can use namespaces or some tricks as in http://9p.io/wiki/plan9/compiling_kernels/index.html 

There is also divergefs for plan9 which I personally don't use but you can give it a try.

Avoid recompiling your kernel, libraries and commands directly in /sys/src.

Good luck
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M60506689a3962f863de10655
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1235 bytes --]

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

* Re: [9fans] mk results in rc: suicide:
  2024-07-05  1:47           ` ibrahim via 9fans
@ 2024-07-07 14:15             ` Marco Feichtinger
  2024-07-07 14:23               ` ori
  2024-07-07 16:22               ` Dave Eckhardt
  0 siblings, 2 replies; 15+ messages in thread
From: Marco Feichtinger @ 2024-07-07 14:15 UTC (permalink / raw)
  To: 9fans

Thanks for the help guys, but unfortunately I couldn't figure it out yet.

I did run MemTest86, which passed; no errors. 
I also tried a different RAM module, but got the same error.

The timestamp of the libraries in /386/lib looks fine.

> To avoid such problems while rebuilding kernels + libraries + commands you can use namespaces or some tricks as in http://9p.io/wiki/plan9/compiling_kernels/index.html
Thanks for the link. 
I tried it, but with the same result.

-marco


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M74cc8958c69e717aa8645afc
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] mk results in rc: suicide:
  2024-07-07 14:15             ` Marco Feichtinger
@ 2024-07-07 14:23               ` ori
  2024-07-07 15:36                 ` Marco Feichtinger
  2024-07-07 16:22               ` Dave Eckhardt
  1 sibling, 1 reply; 15+ messages in thread
From: ori @ 2024-07-07 14:23 UTC (permalink / raw)
  To: 9fans

Have you looked at the crashed binary in acid, and checked if the
PC seems to be pointing at something sensible? Do you get a sane
stack trace?

Can you post it?

Quoth Marco Feichtinger <marco@germteig.com>:
> Thanks for the help guys, but unfortunately I couldn't figure it out yet.
> 
> I did run MemTest86, which passed; no errors. 
> I also tried a different RAM module, but got the same error.
> 
> The timestamp of the libraries in /386/lib looks fine.
> 
> > To avoid such problems while rebuilding kernels + libraries + commands you can use namespaces or some tricks as in http://9p.io/wiki/plan9/compiling_kernels/index.html
> Thanks for the link.
> I tried it, but with the same result.
> 
> -marco
> 

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M1b5b098f70fbd4041d744643
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] mk results in rc: suicide:
  2024-07-07 14:23               ` ori
@ 2024-07-07 15:36                 ` Marco Feichtinger
  0 siblings, 0 replies; 15+ messages in thread
From: Marco Feichtinger @ 2024-07-07 15:36 UTC (permalink / raw)
  To: 9fans

Error during compiling:
        rc 718: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
        mk: 8c -FTVw mtrr.c  : exit status=rc 718: sys: trap: fault read addr=0x965708 pc=0x0000b5d9

acid:
        term% acid 718
        /proc/718/text:386 plan 9 executable
        /sys/lib/acid/port
        /sys/lib/acid/386
        acid: src(0x0000b5d9)
        /sys/src/cmd/rc/plan9.c:476
         471            int n;
         472    
         473            if(f<0 || f>=NFD)
         474                    return 0;
         475    Again:
        >476            if(dir[f].i==dir[f].n){ /* read */
         477                    free(dir[f].dbuf);
         478                    dir[f].dbuf = 0;
         479                    n = dirread(f, &dir[f].dbuf);
         480                    if(n>0){
         481                            if(onlydirs){
        acid: regs()
        PC      0x0000b5d9 Readdir+0x2d  /sys/src/cmd/rc/plan9.c:476
        SP      0xdfffeea3 ECODE 0x00000004 EFLAG 0x00010286
        CS      0x00000023 DS    0x0000001b SS  0x0000001b
        GS      0x0000001b FS    0x0000001b ES  0x0000001b
        TRAP    0x0000000e page fault
        AX      0xdfffef00 BX   0x00965700 CX   0x00000214 DX   0x00040b20
        DI      0x00016ca7 SI   0x00155720 BP   0x000176c8
        acid: 

I didn't get any wiser.

-marco


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-Mc70655e9f948394f4a04c002
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] mk results in rc: suicide:
  2024-07-07 14:15             ` Marco Feichtinger
  2024-07-07 14:23               ` ori
@ 2024-07-07 16:22               ` Dave Eckhardt
  2024-07-07 17:24                 ` wb.kloke
  2024-07-07 18:23                 ` Marco Feichtinger
  1 sibling, 2 replies; 15+ messages in thread
From: Dave Eckhardt @ 2024-07-07 16:22 UTC (permalink / raw)
  To: 9fans

> I did run MemTest86, which passed; no errors.

Not to be a pain, but did you run it for at least 12 hours?
Sadly, it can take that long or longer to uncover a marginal
module.  A really-horribly-bad module will fail in the first
run, but you may not be that "lucky".

Dave Eckhardt

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M9b47d06348b1f258e2d48066
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] mk results in rc: suicide:
  2024-07-07 16:22               ` Dave Eckhardt
@ 2024-07-07 17:24                 ` wb.kloke
  2024-07-07 18:23                   ` Marco Feichtinger
  2024-07-07 18:23                 ` Marco Feichtinger
  1 sibling, 1 reply; 15+ messages in thread
From: wb.kloke @ 2024-07-07 17:24 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

What about swap memory?

I wonder, why the process works, if slowed down by manual scrolling.
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M208a397f8c49e88256d1dacf
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 841 bytes --]

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

* Re: [9fans] mk results in rc: suicide:
  2024-07-07 16:22               ` Dave Eckhardt
  2024-07-07 17:24                 ` wb.kloke
@ 2024-07-07 18:23                 ` Marco Feichtinger
  1 sibling, 0 replies; 15+ messages in thread
From: Marco Feichtinger @ 2024-07-07 18:23 UTC (permalink / raw)
  To: 9fans

> Not to be a pain, but did you run it for at least 12 hours?
No.
But I did run 4 iterations, which took about 5 hours.

-marco


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-Mfe0ec20cf84cbc0273833982
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] mk results in rc: suicide:
  2024-07-07 17:24                 ` wb.kloke
@ 2024-07-07 18:23                   ` Marco Feichtinger
  0 siblings, 0 replies; 15+ messages in thread
From: Marco Feichtinger @ 2024-07-07 18:23 UTC (permalink / raw)
  To: 9fans

> What about swap memory?
No swap.

-marco

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-M3f20653e6d91dd306ae7752f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

end of thread, other threads:[~2024-07-07 18:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-04 13:43 [9fans] mk results in rc: suicide: Marco Feichtinger
2024-07-04 14:27 ` Alexander Kapshuk
2024-07-04 15:19   ` wb.kloke
2024-07-04 18:44     ` Marco Feichtinger
2024-07-04 19:54       ` Dave Eckhardt
2024-07-04 19:57         ` Charles Forsyth
2024-07-05  1:32           ` ibrahim via 9fans
2024-07-05  1:47           ` ibrahim via 9fans
2024-07-07 14:15             ` Marco Feichtinger
2024-07-07 14:23               ` ori
2024-07-07 15:36                 ` Marco Feichtinger
2024-07-07 16:22               ` Dave Eckhardt
2024-07-07 17:24                 ` wb.kloke
2024-07-07 18:23                   ` Marco Feichtinger
2024-07-07 18:23                 ` Marco Feichtinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).