'make check' failing. "A system call received a parameter...

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 'make check' failing. "A system call received a paramete

Post by magick »

We're not sure why your system is throwing a system error. It may occur inside the JPEG delegate library. You'll need to use a trace program (e.g. strace) to find out where the system error is thrown.
dave
Posts: 15
Joined: 2013-05-06T08:41:28-07:00
Authentication code: 6789

Re: 'make check' failing. "A system call received a paramete

Post by dave »

The error is being thrown in the SyncBlob() function, when calling msync(). errno=22 (EINVAL)

When reading a jpeg file, the file is treated differently, it is memory mapped and treated as a 'BlobStream'. The msync() causes the error.

When reading a tiff file, the file is treated as a 'FileStream' and no errors are encountered.

It doesn't seem correct to even call msync() when the jpeg is opened in readonly mode to begin with.

Perhaps I could just run configure and somehow leave out the file memory mapping completely? (just not sure how to do that).
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 'make check' failing. "A system call received a paramete

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.6-0 Beta available by sometime tomorrow. Thanks.
dave
Posts: 15
Joined: 2013-05-06T08:41:28-07:00
Authentication code: 6789

Re: 'make check' failing. "A system call received a paramete

Post by dave »

I have tried the 6.8.6-0 version, and the problem continues. Same error calling msync().

According the the IBM (AIX 6.1) documentation for msync(), using the MS_SYNC flag is invalid when MAP_PRIVATE is used on the mmap() call. MAP_PRIVATE is being set on mmap().

I have tried using MS_INVALIDATE on the msync() call, but the same error results. There appears something more at play here. Is there a way to avoid the memory mapping completely?

flags
Specifies one or more of the following symbolic constants that determine the way caching operations are performed:
MS_SYNC
Specifies synchronous cache flush. The msync subroutine does not return until the system completes all I/O
operations.

This flag is invalid when the MAP_PRIVATE flag is used with the mmap subroutine. MAP_PRIVATE is the default
privacy setting. When the MS_SYNC and MAP_PRIVATE flags both are used, the msync subroutine returns an errno value
of EINVAL.
MS_ASYNC
Specifies an asynchronous cache flush. The msync subroutine returns after the system schedules all I/O operations.

This flag is invalid when the MAP_PRIVATE flag is used with the mmap subroutine. MAP_PRIVATE is the default
privacy setting. When the MS_SYNC and MAP_PRIVATE flags both are used, the msync subroutine returns an errno value
of EINVAL.
MS_INVALIDATE
Specifies that the msync subroutine invalidates all cached copies of the pages. New copies of the pages must then
be obtained from the file system the next time they are referenced.
dave
Posts: 15
Joined: 2013-05-06T08:41:28-07:00
Authentication code: 6789

Re: 'make check' failing. "A system call received a paramete

Post by dave »

I have modified magick-baseconfig.h to unset 2 defines to disable memory mapped fileio, as follows:

/* Define to 1 if you have a working `mmap' system call. */
#undef MAGICKCORE_HAVE_MMAP

/* Define to 1 if you have a working `mmap' system call. */
#undef MAGICKCORE_HAVE_MMAP_FILEIO

This appears to work fine. I'm hoping there's a better way to do this, an option to the configure command perhaps?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 'make check' failing. "A system call received a paramete

Post by magick »

Easy fix. We'll track the memory-mapping mode. If its read, we won't sync. Look for a patch by sometime tomorrow in 6.8.6-0 Beta.
dave
Posts: 15
Joined: 2013-05-06T08:41:28-07:00
Authentication code: 6789

Re: 'make check' failing. "A system call received a paramete

Post by dave »

Just confirming that 6.8.6-1 Beta fixes the problem.

Thank-you.
Post Reply