Re: No human readable message with g_vfs

Previous thread: r216763 panic while running smartd by Bartosz Stec on Tuesday, December 28, 2010 - 12:10 pm. (1 message)

Next thread: ahci timeout by Barbara on Wednesday, December 29, 2010 - 10:38 am. (1 message)
From: David Demelier
Date: Wednesday, December 29, 2010 - 3:32 am

Hello,

Sometimes when I use my external harddrive I get these awful message :

g_vfs_done():da1[WRITE(offset=34590720, length=65536)]error = 5
/var/log/messages.1.bz2:Dec 21 18:36:07 Abricot kernel: 
g_vfs_done():da1[WRITE(offset=34656256, length=65536)]error = 5
/var/log/messages.1.bz2:Dec 21 18:36:07 Abricot kernel: 
g_vfs_done():da1[WRITE(offset=34721792, length=65536)]error = 5
/var/log/messages.1.bz2:Dec 21 18:36:07 Abricot kernel: 
g_vfs_done():da1[WRITE(offset=34787328, length=65536)]error = 5
/var/log/messages.1.bz2:Dec 21 18:36:07 Abricot kernel: 
g_vfs_done():da1[WRITE(offset=34852864, length=65536)]error = 5
/var/log/messages.1.bz2:Dec 21 22:50:28 Abricot kernel: 
g_vfs_done():ufs/public[WRITE(offset=244271529984, length=16384)]error = 5
/var/log/messages.1.bz2:Dec 21 22:50:28 Abricot kernel: 
g_vfs_done():ufs/public[READ(offset=244563705856, length=131072)]error = 5
/var/log/messages.5.bz2:Nov 29 16:36:52 Abricot kernel: 
g_vfs_done():ufs/public[READ(offset=232718991360, length=131072)]error = 5

I think for a lambda user these are absolutely not understandable. I 
think these message could be enabled with a little options in the kernel 
config.

why not something like "options     GPART_DEBUG" or something else? And 
do something more readable without.

Kind regards,

--
David Demelier
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
From: Ivan Voras
Date: Monday, January 3, 2011 - 6:14 am

Would a better message be "WRITE error on da0, offset=34590720. 
length=65536, errno=5"?


_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
From: Matthias Andree
Date: Monday, January 3, 2011 - 6:16 am

nah, strerror(errno) isn't that much of an effort

_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
From: Kostik Belousov
Date: Monday, January 3, 2011 - 7:18 am

In kernel ? There is no strerror, and there is no great need to import the
sys_errlist.
From: Edward Tomasz Napierała
Date: Monday, January 3, 2011 - 9:33 am

I had code that adds strerror() to the kernel in one of my old p4 branches.
Error messages like the one above look much better this way, but I didn't
have time to push it into the tree, and there is a risk of yet another i18n
discussion.  If someone is interested - let me know; I'll try to find it.

--
If you cut off my head, what would I say?  Me and my head, or me and my body?

_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
From: Garrett Cooper
Date: Monday, January 3, 2011 - 10:55 am

Some thoughts:
- It's a pain to parse (before I just had to scan for an int -- now it's a string?!?)
- It slows down printing (slow kernel -> dog slow system).
- Fills up logs quicker if a subsystem or piece of hardware is going south and these messages slam syslog, which means I have to scan more logs looking for useful data, the likelihood of messages being lost in various buffers is higher, etc.

Why not just provide a more standard sensical printout for the messages and provide a secret decoder ring in userland or something for interested parties the don't know that error is an errno value (eg my mom and dad because they're unix illiterate), or just copyout all of the error data via an ioctl, print out the ioctl failures, and skip the kernel level printing altogether?

Thanks!
-Garrett_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
From: Anonymous
Date: Monday, January 3, 2011 - 11:20 am

Do you mean perror(1)?

  $ perror 5
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
From: Garrett Cooper
Date: Monday, January 3, 2011 - 11:41 am

Heh -- didn't realize that someone made a userland app for that libcall already :D... You learn new things everyday I guess :).

In that case IMO nothing needs to be done minus (if you're interested) creating a parser that data mines stuff to make it more human readable in a common format, i.e.

error: 5 (Input/output error)
<subsystem specific information does here>


Thanks!
-Garrett_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
From: Bakul Shah
Date: Monday, January 3, 2011 - 12:02 pm

I prefer mine:

$ errno () { grep "^#.*\\<$*\\>" /usr/include/sys/errno.h }
$ errno 5
#define EIO             5               /* Input/output error */
$ errno EIO
#define EIO             5               /* Input/output error */
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
From: Anonymous
Date: Monday, January 3, 2011 - 12:21 pm

perror(1) displays localized messages

  $ LANG=ja_JP.UTF-8 perror 5
  入出力エラーです

  $ LANG=uk_UA.UTF-8 perror 5
  Помилка вводу-виводу

but I have to agree that knowing errno macro is useful
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
From: Bakul Shah
Date: Monday, January 3, 2011 - 12:53 pm

And you can use grep tricks :-)

$ errno '[dD]evice'
#define ENXIO           6               /* Device not configured */
#define ENOTBLK         15              /* Block device required */
#define EBUSY           16              /* Device busy */
#define EXDEV           18              /* Cross-device link */
#define ENODEV          19              /* Operation not supported by device */
#define ENOTTY          25              /* Inappropriate ioctl for device */
#define ENOSPC          28              /* No space left on device */
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
Previous thread: r216763 panic while running smartd by Bartosz Stec on Tuesday, December 28, 2010 - 12:10 pm. (1 message)

Next thread: ahci timeout by Barbara on Wednesday, December 29, 2010 - 10:38 am. (1 message)