From: Dmad <dmadhatr@sdf.org>
To: 9front@9front.org
Subject: Re: [9front] 9Front Drawterm Code 139 Sig 11 SIGSEGV
Date: Sun, 24 Sep 2023 15:13:09 +0000 (UTC) [thread overview]
Message-ID: <3606b921-b556-2f37-43e0-9dca18e3bc01@sdf.org> (raw)
In-Reply-To: <CAGOW0YO5mSy-wmzXJHvPw3Uc7bv0fN7JzUmKVCTgMfeoZUBiTg@mail.gmail.com>
On Sat, 23 Sep 2023, Amavect wrote:
Was able to fix the memory issue with a tas.c function replacement
yesterday,
however, you may have found a way to fix the cpu bug message everyone has
been getting from the 9front drawterm build.
> Date: Sat, 23 Sep 2023 23:44:32 -0500
> From: Amavect <amavect@gmail.com>
> Reply-To: 9front@9front.org
> To: 9front@9front.org
> Subject: Re: [9front] 9Front Drawterm Code 139 Sig 11 SIGSEGV
>
> On Sat, Sep 23, 2023 at 6:24?PM Dmad <dmadhatr@sdf.org> wrote:
>> #3 0x0000000000226cdf in incref (r=0x0) at chan.c:57
> You have a null pointer dereference.
>
> Digging into this a bit,
> kern/chan.c:847: incref(&path->ref);
> ref is the first member of path, and path is not dereferenced,
> so the question is where c->path is set to null.
>
> A path of "./dev/label" results in namec()'s default case to be taken.
> kern/chan.c:1222: c = up->dot;
>
> up->dot appears to be defined in _syschdir().
> We know that chdir failed, so something happened.
> kern/sysfile:628:
> validaddr(name, 1, 0);
> c = namec(name, Atodir, 0, 0);
> cclose(up->dot);
> up->dot = c;
>
> Note that the validaddr() is a no-op macro on drawterm,
> but an actual function on 9front.
> If that would detect a problem, then maybe drawterm should have it.
> Perhaps someone else has a better idea of kernel internals,
> and how they parallel to drawterm.
>
>> Was not able to get a bt stack after compiling with additional CFLAGs
> Clearly a crash didn't happen with -O0.
> Were you able to login and start typing commands into drawterm?
>
> For fun, I installed FreeBSD on Qemu and compiled drawterm.
> No issues logging onto my server,
> but I don't know how to trigger a chdir failure.
>
> Thanks,
> Amavect
>
>
dmadhatr@sdf.org
SDF Public Access UNIX System - http://sdf.org
next prev parent reply other threads:[~2023-09-24 15:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 19:11 Dmad
2023-09-22 19:55 ` hiro
2023-09-23 13:44 ` Dmad
2023-09-23 1:10 ` Amavect
2023-09-23 13:52 ` Dmad
2023-09-23 16:04 ` Dmad
2023-09-23 17:32 ` Dmad
2023-09-24 1:39 ` Dmad
2023-09-24 2:28 ` Sigrid Solveig Haflínudóttir
2023-09-24 2:40 ` Dmad
2023-09-24 3:11 ` Dmad
2023-09-24 3:24 ` Dmad
2023-09-24 4:44 ` Amavect
2023-09-24 15:13 ` Dmad [this message]
2023-09-27 4:45 ` Amavect
2023-09-25 13:54 ` Xiao-Yong Jin
2023-09-25 14:47 ` Dmad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3606b921-b556-2f37-43e0-9dca18e3bc01@sdf.org \
--to=dmadhatr@sdf.org \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).