Bug #41047 Sporadic valgrind message in pushbuild: "WARNING: unhandled syscall: 142"
Submitted: 26 Nov 2008 10:33 Modified: 1 Mar 2013 7:55
Reporter: Sven Sandberg Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Tests Severity:S7 (Test Cases)
Version:5.1 OS:Any
Assigned to: Daniel Fischer CPU Architecture:Any
Tags: pushbuild, sporadic, test failure, unhandled syscall, valgrind

[26 Nov 2008 10:33] Sven Sandberg
Description:
Valgrind has started printing this message for random tests in the main suite in embedded mode, starting 2008-10-15:

main.innodb_mysql                        [ fail ]

CURRENT_TEST: main.innodb_mysql
safe_process[27244]: parent_pid: 11260
safe_process[27244]: Started child 27245, terminated: 0
==27245== Memcheck, a memory error detector.
==27245== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==27245== Using LibVEX rev 1732, a library for dynamic binary translation.
==27245== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==27245== Using valgrind-3.2.3, a dynamic binary instrumentation framework.
==27245== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==27245== For more details, rerun with: -v
==27245== 
--27245-- WARNING: unhandled syscall: 142
--27245-- You may be able to write your own handler.
--27245-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--27245-- WARNING: unhandled syscall: 142
--27245-- You may be able to write your own handler.
--27245-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--27245-- WARNING: unhandled syscall: 142
--27245-- You may be able to write your own handler.
--27245-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--27245-- WARNING: unhandled syscall: 142
--27245-- You may be able to write your own handler.
--27245-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
InnoDB: The first specified data file /dev/shm/var-embedded-111/mysqld.1/data/ibdata1 did not exist:
InnoDB: a new database to be created!
081121 15:53:36  InnoDB: Setting file /dev/shm/var-embedded-111/mysqld.1/data/ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
081121 15:53:36  InnoDB: Log file /dev/shm/var-embedded-111/mysqld.1/data/ib_logfile0 did not exist: new to be created
InnoDB: Setting log file /dev/shm/var-embedded-111/mysqld.1/data/ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
081121 15:53:37  InnoDB: Log file /dev/shm/var-embedded-111/mysqld.1/data/ib_logfile1 did not exist: new to be created
InnoDB: Setting log file /dev/shm/var-embedded-111/mysqld.1/data/ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
--27245-- WARNING: unhandled syscall: 142
--27245-- You may be able to write your own handler.
--27245-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--27245-- WARNING: unhandled syscall: 142
--27245-- You may be able to write your own handler.
--27245-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
--27245-- WARNING: unhandled syscall: 142
--27245-- You may be able to write your own handler.
--27245-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--27245-- WARNING: unhandled syscall: 142
--27245-- You may be able to write your own handler.
--27245-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--27245-- WARNING: unhandled syscall: 142
--27245-- You may be able to write your own handler.
--27245-- Read the file README_MISSING_SYSCALL_OR_IOCTL.

etc.

How to repeat:
E.g., in main.innodb_mysql on https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-5.1-rpl&order=87 pb-valgrind/embedded

xref: http://tinyurl.com/677pwe
[26 Nov 2008 10:37] Sven Sandberg
Here's a copy of the README_MISSING_SYSCALL_OR_IOCTL file mentioned by the error message: http://www.lrz-muenchen.de/services/software/programmierung/valgrind/html_3.0/dist.readme-...

This has only happened in 5.1 so far, and it happens in different trees.
[2 Dec 2008 10:15] Daniel Fischer
Syscall 142 on Linux x86_64 is sched_setparam. We are running valgrind 3.2.3, which does not have a wrapper for this syscall on Linux x86_64.

The wrapper was enabled on July 9 2008 in valgrind svn:

r8405 | bart | 2008-07-09 09:39:09 +0200 (Wed, 09 Jul 2008) | 1 line
Enabled support for the sched_setparam() system call on the amd64, ppc32 and ppc64 platforms (was already enabled on x86).

The current valgrind 3.3.1, which was published one month before that date. There is no stable valgrind release with this wrapper enabled.

Possible workaround: Compile valgrind from svn.
[8 Apr 2009 14:59] Jonas Oreland
According to http://valgrind.org/downloads/current.html version
valgrind 3.4.1 was released 28 Feb 2009.

This (i think) implies that we can upgrade, to remove this very annoying
spam from logs.

Correct?
[1 Mar 2013 7:55] Erlend Dahl
This was very probably related to an old Valgrind bug. Has not been reported
seen for a very long time.
[1 Mar 2013 9:39] Daniel Fischer
Confirming that we have indeed updated valgrind since then, and are now running a version that should recognize syscall 142. We're currently running 3.8.1.