[OmniOS-discuss] kstat -p gives segfault on OmniOS r151006

Robin Smidsrød robin at smidsrod.no
Mon Jun 24 02:55:56 EDT 2013


On 24.06.2013 03:32, Richard Elling wrote:
> On Jun 23, 2013, at 4:12 AM, Robin Smidsrød <robin at smidsrod.no
> <mailto:robin at smidsrod.no>> wrote:
>>
>> I'm having a problem with kstat -p segfaulting on me.
>>
>> I've included the output from truss here:
>> https://gist.githubcom/robinsmidsrod/5844493
>> <https://gist.github.com/robinsmidsrod/5844493>
>>
>> A user on irc (gcbirzan) confirmed that he did not get a segfault on a
>> clean install of r151006, so it seems this might be related to some
>> stmf_tgt-related configuration which is confusing kstat. He also
>> confirmed that he got the same segfault on his system that has some
>> iscsi targets setup. This is his exact uttering:
>>
>> "<gcbirzan> I get the same :) but I always assumed it's because I hacked
>> libiscsit to have more than 255 targets"
> 
> More likely, you don't have an alias for the target. This leaves a null
> pointer
> where kstat expects a string. Simple fix that Theo already submitted.

After I provided Theo with a core file he was able to come up with a fix
that I have already verified worked on my system. He said he would push
it upstream.

>> Any chance of a fix and a backport to stable?
> 
> This is a very low risk, only affects the kstat command itself.

Yeah, that was what Theo said as well, so I'm eager to see it in stable.

Thank you for a quick fix!

-- Robin



More information about the OmniOS-discuss mailing list