Personal computing discussed

Moderators: SecretSquirrel, notfred

 
Ryu Connor
Gold subscriber
Global Moderator
Topic Author
Posts: 4215
Joined: Thu Dec 27, 2001 7:00 pm
Location: Marietta, GA
Contact:

Spell command issue

Fri May 29, 2009 1:49 pm

I am running OpenSolaris (5.11 snv_101b)

The spell command does not work and I'm at a loss as to why this might be happening.

A Google and a search through the OpenSolaris bug database only turned up two relevant hits that I could find.

http://bugs.opensolaris.org/bugdatabase ... id=1215008 (A Problem from 1995 that could not be reproduced)

http://forums.opensolaris.com/thread.js ... 3024&#3024 (A message from April the 19th of this year that espouses my same issue)

/usr/dict/words does have text in it

Any ideas on what I need to do to fix this?
All of my written content here on TR does not represent or reflect the views of my employer or any reasonable human being. All content and actions are my own.
 
bitvector
Grand Gerbil Poohbah
Posts: 3250
Joined: Wed Jun 22, 2005 4:39 pm
Location: San Francisco, CA

Re: Spell command issue

Sat May 30, 2009 9:47 am

Ryu Connor wrote:
Any ideas on what I need to do to fix this?

So, you say you think the second forum post concerns the same issue? You didn't describe how spell "doesn't work" for you, but that user said that basically it runs but there is no output at all; no errors, no results. If that is the case, have you tried running it under "truss" (which is a lot like ltrace and strace under Linux) with a simple test file to see if you see anything suspicious you can notice? By suspicious, I mean it might try to open some file or library and get get an error (EPERM or ENOENT or whatever) and then silently exit. Those tools sometimes help me figure out what is amiss in silently failing programs. Also, after spell runs, have you checked the return status to the shell? Is it success or some failure code?
 
Ryu Connor
Gold subscriber
Global Moderator
Topic Author
Posts: 4215
Joined: Thu Dec 27, 2001 7:00 pm
Location: Marietta, GA
Contact:

Re: Spell command issue

Sat May 30, 2009 7:32 pm

Aye, just like the second post, no output is occuring even when spell is run against incorrect words or files that contain words with errors.

No errors are visibly being spit out at the prompt regarding the commands operation. I have tried executing the spell command with different users and different role based levels including root.

I have not yet tried the two suggestions you speak of and to be honest was not aware of them.

I will google/man truss Monday.

What command or action do I need to take to examine the return status the command is sending the shell?
All of my written content here on TR does not represent or reflect the views of my employer or any reasonable human being. All content and actions are my own.
 
notfred
Maximum Gerbil
Posts: 4396
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: Spell command issue

Sat May 30, 2009 8:48 pm

echo $?
will show the return code of the previous command. Make sure you run it immediately after the command - e.g. if you fat finger the echo then get it right, it will show the status of the fat fingered echo and not the spell command.

It's been a while since I was on Solaris and used truss, but I use strace on Linux a fair bit. Check through the man page and see if there is an option to give you just file operations - on strace it is "-e trace=file" and also ensure you trace the child processes - on strace "-f".
 
Ryu Connor
Gold subscriber
Global Moderator
Topic Author
Posts: 4215
Joined: Thu Dec 27, 2001 7:00 pm
Location: Marietta, GA
Contact:

Re: Spell command issue

Tue Jun 02, 2009 8:59 am

-bash-3.2$ spell letter1
-bash-3.2$ echo $?
0


=/

Truss capture

Truss seems rather programmer oriented.

I can see the actions taking place, I can see it hitting against the file letter1 which is the test file filled with incorrect words, but that's about it. I'm afraid making sense of why it's failing to provide output is beyond me.
All of my written content here on TR does not represent or reflect the views of my employer or any reasonable human being. All content and actions are my own.
 
notfred
Maximum Gerbil
Posts: 4396
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: Spell command issue

Tue Jun 02, 2009 1:54 pm

Important thing is it is not hitting /usr/dict/words so it is not picking up the dictionary. Are you sure you are invoking it correctly? I do see it pipe and fork and then SIGCLD at that point so it may be doing that in a subprocess though. Did you ensure that you are trussing the child processes?
 
Ryu Connor
Gold subscriber
Global Moderator
Topic Author
Posts: 4215
Joined: Thu Dec 27, 2001 7:00 pm
Location: Marietta, GA
Contact:

Re: Spell command issue

Wed Jun 03, 2009 1:14 pm

Full Truss

I followed up on your request and used the -f option to truss the child processes as well.

As for my syntax for the spell command. I used "spell <target>", where target is the file with misspelled words.

That behavior works fine on Solaris 9 and a bit of digging in the man and on the interwebs seems to imply that my syntax is correct.

FWIW, this is also a very fresh install of OpenSolaris with little to no modification. It is being run under VMWare, but if that's causing this bug that's pretty weird.
All of my written content here on TR does not represent or reflect the views of my employer or any reasonable human being. All content and actions are my own.
 
notfred
Maximum Gerbil
Posts: 4396
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: Spell command issue

Wed Jun 03, 2009 9:32 pm

Searching through that file I don't see it do anything with /usr/dict/words which is where you say it stores the dictionary. Not sure what it is doing for trying to read the dictionary, I do see
4589:   stat64("/usr/lib/spell", 0x08046D90)      = 0
4589:   open64("/usr/lib/spell/.paths", O_RDONLY)   Err#2 ENOENT
4589:   stat64("/usr/bin", 0x08046D90)         = 0
4589:   open64("/usr/bin/.paths", O_RDONLY)      Err#2 ENOENT
4589:   stat64("/usr/ucb", 0x08046D90)         = 0
4589:   open64("/usr/ucb/.paths", O_RDONLY)      Err#2 ENOENT
4589:   stat64("/isoa/etd", 0x08046D90)         = 0
4589:   open64("/isoa/etd/.paths", O_RDONLY)      Err#2 ENOENT
4589:   stat64("/etc", 0x08046D90)         = 0
4589:   open64("/etc/.paths", O_RDONLY)         Err#2 ENOENT
4589:   stat64(".", 0x08046D90)            = 0
Not sure if those are meant to contain a pointer to the dictionary or something?
 
Ryu Connor
Gold subscriber
Global Moderator
Topic Author
Posts: 4215
Joined: Thu Dec 27, 2001 7:00 pm
Location: Marietta, GA
Contact:

Re: Spell command issue

Fri Jun 05, 2009 9:18 am

The newest build of OpenSolaris is out. I'll do an update and see if this weird bug persists.
All of my written content here on TR does not represent or reflect the views of my employer or any reasonable human being. All content and actions are my own.
 
Ryu Connor
Gold subscriber
Global Moderator
Topic Author
Posts: 4215
Joined: Thu Dec 27, 2001 7:00 pm
Location: Marietta, GA
Contact:

Re: Spell command issue

Mon Jun 08, 2009 2:34 pm

The paths you quoted above - with one exception - are from the users .profile and you're right in that none of them get back to /usr/dict/words

The exception is /usr/lib/spell, but I am unsure that the dictionary is supposed to be there. It is largely loaded with executables, binary data files, and a script file.

I see the spell command hitting data within the misspelled file. The truss has captured the first two words of it.

I see it and even found the history of users who have leverages the spell command at /var/adm/spellhist

I see it leveraged a who in order to add information to the spellhist file.

It appears to have made a temporary file in /tmp related to the command.

Yet despite all that and an entire OS upgrade to 06_09 it still doesn't work.
All of my written content here on TR does not represent or reflect the views of my employer or any reasonable human being. All content and actions are my own.

Who is online

Users browsing this forum: No registered users and 1 guest