<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 7/14/25 18:34, Till Wegmüller wrote:<br>
</div>
<blockquote type="cite"
cite="mid:9b914adf-c51b-491b-aadf-dad8dc3359a0@gmail.com">Hi Paul
<br>
<br>
Have you tried mdb? We have our own debug data format called CTF
and depending on how you compiled your file the DWARF data may be
stripped from the binary.
<br>
<br>
If you want a stacktrace from mdb you can type ::stack
<br>
<br>
For more detailed usage of mdb check the manpage or ask on
#illumos IRC or any illumos mailinglist. There are not many
illumos devs here on this list and I have never used gdb. Only
ever mdb. <br>
<br>
</blockquote>
<p>Hi</p>
<p>I haven't tried mdb (I'm not a kernel developer).</p>
<p>This just looks like a kernel bug to me (in both Solaris 11.4 and
illumos).</p>
<p>The Solaris 11.4 man page says (and I guess illumos is the same):</p>
<p><span style="font-family:monospace"><span
style="color:#000000;background-color:#ffffff;"></span><br>
<span style="color:#000000;background-color:#ffffff;"> </span><span
style="font-weight:bold;color:#000000;background-color:#ffffff;">ETXTBSY</span><span
style="color:#000000;background-color:#ffffff;"> The
file is a pure procedure (shared text) file that is</span><span
style="color:#000000;background-color:#ffffff;">
</span><br>
<span style="color:#000000;background-color:#ffffff;">
being executed and </span><span
style="text-decoration:underline;color:#000000;background-color:#ffffff;">oflag</span><span
style="color:#000000;background-color:#ffffff;"> is </span><span
style="font-weight:bold;color:#000000;background-color:#ffffff;">O_WRONLY</span><span
style="color:#000000;background-color:#ffffff;"> or </span><span
style="font-weight:bold;color:#000000;background-color:#ffffff;">O_RDWR</span><span
style="color:#000000;background-color:#ffffff;">.</span><br>
<span style="color:#000000;background-color:#ffffff;"></span><br>
</span>The first thing that my testcase does is an open exactly
like that with O_WRONLY|O_CREAT|O_TRUNC</p>
<p>This succeeds and crashes the exe. Maybe the kernel is only
checking for O_WRONLY or O_RDWR?</p>
<p>I also wonder if this is not a security issue.</p>
<p>A+</p>
<p>Paul</p>
<p><br>
</p>
</body>
</html>