mogrify dies with no reason

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.
Post Reply
bugman
Posts: 7
Joined: 2013-09-30T08:38:18-07:00
Authentication code: 6789

mogrify dies with no reason

Post by bugman »

Hello dear community,

I've struggling against next issue: mogrify utility exits unexpectedly with echoing "Killed" and returning exit code of 137.

Code: Select all

[root@bugman artviktor.ru]# mogrify -resize 1280 -format jpg -quality 70 /tmp/lrg_out.jpeg 
Killed

[root@bugman artviktor.ru]# echo $?
137
Verbose option doesn't say much about error's nature:

Code: Select all

[root@bugman artviktor.ru]# mogrify -resize 1280 -format jpg -quality 70 -verbose /tmp/lrg_out.jpeg 
/tmp/lrg_out.jpeg JPEG 2548x3064 2548x3064+0+0 PseudoClass 256c 1.8mb 
Killed
Free memory is enough for such conversion (it may be fragmented though). File was created with using simple-scan, it's opened smoothly via GIMP / image previewers / etc.

Code: Select all

[root@bugman artviktor.ru]# free -m
             total       used       free     shared    buffers     cached
Mem:           256        134        121          0          0          7
-/+ buffers/cache:        127        128
Swap:            0          0          0

[root@bugman artviktor.ru]# ls -lah /tmp/lrg_out.jpeg
-rw-r----- 1 root root 1.8M Sep 30 19:13 /tmp/lrg_out.jpeg
ImageMagic is updated to the most recent available version.

Code: Select all

[root@bugman artviktor.ru]# rpm -q ImageMagick
ImageMagick-6.2.8.0-15.el5_8

[root@bugman artviktor.ru]# cat /etc/redhat-release 
CentOS release 5.5 (Final)

Last edited by bugman on 2013-09-30T09:13:54-07:00, edited 1 time in total.
bugman
Posts: 7
Joined: 2013-09-30T08:38:18-07:00
Authentication code: 6789

Re: mogrify dies without

Post by bugman »

Here's the strace output, if that would help:

Code: Select all

[root@bugman artviktor.ru]# strace mogrify -resize 1280 -format jpg -quality 70 /tmp/lrg_out.jpeg 
execve("/usr/bin/mogrify", ["mogrify", "-resize", "1280", "-format", "jpg", "-quality", "70", "/tmp/lrg_out.jpeg"], [/* 18 vars */]) = 0
brk(0)                                  = 0x918e000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=22564, ...}) = 0
mmap2(NULL, 22564, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7731000
close(3)                                = 0
open("/usr/lib/libMagick.so.10", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@w\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1851468, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7730000
mmap2(NULL, 1948828, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7554000
mmap2(0xb76d1000, 290816, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d) = 0xb76d1000
mmap2(0xb7718000, 97436, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7718000
close(3)                                = 0
open("/usr/lib/libWand.so.10", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\324\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=752220, ...}) = 0
mmap2(NULL, 750972, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb749c000
mmap2(0xb7552000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb6) = 0xb7552000
close(3)                                = 0
open("/usr/lib/liblcms.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220T\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=210972, ...}) = 0
mmap2(NULL, 223264, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7465000
mmap2(0xb7498000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x32) = 0xb7498000
mmap2(0xb749a000, 6176, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb749a000
close(3)                                = 0
open("/usr/lib/libtiff.so.3", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@K\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=364364, ...}) = 0
mmap2(NULL, 364192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb740c000
mmap2(0xb7463000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x57) = 0xb7463000
close(3)                                = 0
open("/usr/lib/libjpeg.so.62", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\"\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=134268, ...}) = 0
mmap2(NULL, 137084, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb73ea000
mmap2(0xb740b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x20) = 0xb740b000
close(3)                                = 0
open("/usr/lib/libfontconfig.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20P\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=192488, ...}) = 0
mmap2(NULL, 191844, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb73bb000
mmap2(0xb73e2000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x27) = 0xb73e2000
close(3)                                = 0
open("/usr/lib/libXext.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340%\0\0004\0\0\0"..., 512) = 512
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb73ba000
fstat64(3, {st_mode=S_IFREG|0755, st_size=60432, ...}) = 0
mmap2(NULL, 63580, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb73aa000
mmap2(0xb73b9000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe) = 0xb73b9000
close(3)                                = 0
open("/usr/lib/libXt.so.6", O_RDONLY)   = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\271\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=353148, ...}) = 0
mmap2(NULL, 353652, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7353000
mmap2(0xb73a6000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x53) = 0xb73a6000
mmap2(0xb73a9000, 1396, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb73a9000
close(3)                                = 0
open("/usr/lib/libbz2.so.1", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\17\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=70404, ...}) = 0
mmap2(NULL, 69128, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7342000
mmap2(0xb7352000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10) = 0xb7352000
close(3)                                = 0
open("/usr/lib/libz.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\25\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=73580, ...}) = 0
mmap2(NULL, 76400, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb732f000
mmap2(0xb7341000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11) = 0xb7341000
close(3)                                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0PH\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=135892, ...}) = 0
mmap2(NULL, 98788, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7316000
mmap2(0xb732b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15) = 0xb732b000
mmap2(0xb732d000, 4580, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb732d000
close(3)                                = 0
open("/usr/lib/libfreetype.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20k\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=525448, ...}) = 0
mmap2(NULL, 524168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7296000
mmap2(0xb7313000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7d) = 0xb7313000
close(3)                                = 0
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\n\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=18812, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7295000
mmap2(NULL, 16504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7290000
mmap2(0xb7293000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7293000
close(3)                                = 0
open("/usr/lib/libSM.so.6", O_RDONLY)   = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\36\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=33532, ...}) = 0
mmap2(NULL, 36368, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7287000
mmap2(0xb728f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7) = 0xb728f000
close(3)                                = 0
open("/usr/lib/libICE.so.6", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 5\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=94280, ...}) = 0
mmap2(NULL, 104464, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb726d000
mmap2(0xb7284000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16) = 0xb7284000
mmap2(0xb7285000, 6160, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7285000
close(3)                                = 0
open("/usr/lib/libX11.so.6", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0pO\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1060524, ...}) = 0
mmap2(NULL, 1060712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb716a000
mmap2(0xb7269000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xff) = 0xb7269000
close(3)                                = 0
open("/lib/libm.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0204\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=214572, ...}) = 0
mmap2(NULL, 163952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7141000
mmap2(0xb7168000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26) = 0xb7168000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340_\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1686224, ...}) = 0
mmap2(NULL, 1410500, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6fe8000
mmap2(0xb713b000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x152) = 0xb713b000
mmap2(0xb713e000, 9668, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb713e000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fe7000
open("/lib/libexpat.so.0", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\37\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=131736, ...}) = 0
mmap2(NULL, 134556, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6fc6000
mmap2(0xb6fe5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e) = 0xb6fe5000
close(3)                                = 0
open("/usr/lib/libXau.so.6", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\t\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=7964, ...}) = 0
mmap2(NULL, 10788, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6fc3000
mmap2(0xb6fc5000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb6fc5000
close(3)                                = 0
open("/usr/lib/libXdmcp.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\16\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=18644, ...}) = 0
mmap2(NULL, 21460, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6fbd000
mmap2(0xb6fc2000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4) = 0xb6fc2000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fbc000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fbb000
set_thread_area({entry_number:-1 -> 12, base_addr:0xb6fbb6c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb713b000, 8192, PROT_READ)   = 0
mprotect(0xb7168000, 4096, PROT_READ)   = 0
mprotect(0xb7293000, 4096, PROT_READ)   = 0
mprotect(0xb732b000, 4096, PROT_READ)   = 0
mprotect(0xb7753000, 4096, PROT_READ)   = 0
munmap(0xb7731000, 22564)               = 0
set_tid_address(0xb6fbb708)             = 3400
set_robust_list(0xb6fbb710, 0xc)        = 0
futex(0xbff1d4a4, FUTEX_WAKE_PRIVATE, 1) = 0
rt_sigaction(SIGRTMIN, {0xb731a3e0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb731a2e0, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sys="Linux", node="bugman.vdsplanet.net", ...}) = 0
brk(0)                                  = 0x918e000
brk(0x91af000)                          = 0x91af000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=56421840, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6dbb000
close(3)                                = 0
time(NULL)                              = 1380556506
getcwd("/var/www/artviktor.ru"..., 4096) = 22
stat64("mogrify", 0xbff19350)           = -1 ENOENT (No such file or directory)
stat64("mogrify", 0xbff19350)           = -1 ENOENT (No such file or directory)
stat64("mogrify", 0xbff19350)           = -1 ENOENT (No such file or directory)
stat64("mogrify", 0xbff19350)           = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_BLOCK, [ABRT], NULL, 8) = 0
rt_sigaction(SIGABRT, {0xb761a950, [ABRT], SA_INTERRUPT}, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [FPE], NULL, 8) = 0
rt_sigaction(SIGFPE, {0xb761a950, [FPE], SA_INTERRUPT}, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [FPE], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [HUP], NULL, 8) = 0
rt_sigaction(SIGHUP, {0xb761a950, [HUP], SA_INTERRUPT}, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [HUP], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT], NULL, 8) = 0
rt_sigaction(SIGINT, {0xb761a950, [INT], SA_INTERRUPT}, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [INT], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [QUIT], NULL, 8) = 0
rt_sigaction(SIGQUIT, {0xb761a950, [QUIT], SA_INTERRUPT}, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [QUIT], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [TERM], NULL, 8) = 0
rt_sigaction(SIGTERM, {0xb761a950, [TERM], SA_INTERRUPT}, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [TERM], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [XCPU], NULL, 8) = 0
rt_sigaction(SIGXCPU, {0xb761a950, [XCPU], SA_INTERRUPT}, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [XCPU], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [XFSZ], NULL, 8) = 0
rt_sigaction(SIGXFSZ, {0xb761a950, [XFSZ], SA_INTERRUPT}, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [XFSZ], NULL, 8) = 0
open("/proc/meminfo", O_RDONLY)         = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7736000
read(3, "MemTotal:         262144 kB\nMemF"..., 1024) = 560
close(3)                                = 0
munmap(0xb7736000, 4096)                = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
time(NULL)                              = 1380556506
getcwd("/var/www/artviktor.ru"..., 4096) = 22
stat64("mogrify", 0xbff151f0)           = -1 ENOENT (No such file or directory)
stat64("mogrify", 0xbff151f0)           = -1 ENOENT (No such file or directory)
stat64("/tmp/lrg_out.jpeg", {st_mode=S_IFREG|0640, st_size=1843607, ...}) = 0
stat64("jpg:", 0xbff14220)              = -1 ENOENT (No such file or directory)
stat64("jpg:", 0xbff14220)              = -1 ENOENT (No such file or directory)
open("/usr/lib/ImageMagick-6.2.8/config/coder.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/ImageMagick-6.2.8/config/coder.xml", O_RDONLY|O_LARGEFILE) = 3
_llseek(3, 0, [3846], SEEK_END)         = 0
mmap2(NULL, 3846, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7736000
munmap(0xb7736000, 3846)                = 0
close(3)                                = 0
open("/usr/share/doc/ImageMagick-6.2.8/coder.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/ImageMagick-6.2.8/coder.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/root/.magick/coder.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/ImageMagick-6.2.8/modules-Q16/coders/jpeg.la", {st_mode=S_IFREG|0755, st_size=929, ...}) = 0
access("/usr/lib/ImageMagick-6.2.8/modules-Q16/coders/jpeg.la", F_OK) = 0
open("/usr/lib/ImageMagick-6.2.8/modules-Q16/coders/jpeg.la", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0755, st_size=929, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7736000
read(3, "# jpeg.la - a libtool library fi"..., 4096) = 929
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7736000, 4096)                = 0
futex(0xb729406c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=22564, ...}) = 0
mmap2(NULL, 22564, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7731000
close(3)                                = 0
open("/lib/tls/i686/sse2/jpeg.a", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686/sse2", 0xbff0fa28) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/jpeg.a", O_RDONLY)  = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686", 0xbff0fa28)     = -1 ENOENT (No such file or directory)
open("/lib/tls/sse2/jpeg.a", O_RDONLY)  = -1 ENOENT (No such file or directory)
stat64("/lib/tls/sse2", 0xbff0fa28)     = -1 ENOENT (No such file or directory)
open("/lib/tls/jpeg.a", O_RDONLY)       = -1 ENOENT (No such file or directory)
stat64("/lib/tls", 0xbff0fa28)          = -1 ENOENT (No such file or directory)
open("/lib/i686/sse2/jpeg.a", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/i686/sse2", 0xbff0fa28)    = -1 ENOENT (No such file or directory)
open("/lib/i686/jpeg.a", O_RDONLY)      = -1 ENOENT (No such file or directory)
stat64("/lib/i686", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/lib/sse2/jpeg.a", O_RDONLY)      = -1 ENOENT (No such file or directory)
stat64("/lib/sse2", 0xbff0fa28)         = -1 ENOENT (No such file or directory)
open("/lib/jpeg.a", O_RDONLY)           = -1 ENOENT (No such file or directory)
stat64("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/tls/i686/sse2/jpeg.a", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls/i686/sse2", 0xbff0fa28) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/i686/jpeg.a", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls/i686", 0xbff0fa28) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/sse2/jpeg.a", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls/sse2", 0xbff0fa28) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/jpeg.a", O_RDONLY)   = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/i686/sse2/jpeg.a", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/i686/sse2", 0xbff0fa28) = -1 ENOENT (No such file or directory)
open("/usr/lib/i686/jpeg.a", O_RDONLY)  = -1 ENOENT (No such file or directory)
stat64("/usr/lib/i686", 0xbff0fa28)     = -1 ENOENT (No such file or directory)
open("/usr/lib/sse2/jpeg.a", O_RDONLY)  = -1 ENOENT (No such file or directory)
stat64("/usr/lib/sse2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/jpeg.a", O_RDONLY)       = -1 ENOENT (No such file or directory)
stat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
munmap(0xb7731000, 22564)               = 0
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2528, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7736000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2528
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7736000, 4096)                = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=25462, ...}) = 0
mmap2(NULL, 25462, PROT_READ, MAP_SHARED, 3, 0) = 0xb6db4000
close(3)                                = 0
futex(0xb713da4c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/usr/lib/ImageMagick-6.2.8/modules-Q16/coders/jpeg.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\24\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=31784, ...}) = 0
mmap2(NULL, 34660, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6dab000
mmap2(0xb6db3000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7) = 0xb6db3000
close(3)                                = 0
time(NULL)                              = 1380556506
open("/usr/lib/ImageMagick-6.2.8/config/delegates.xml", O_RDONLY|O_LARGEFILE) = 3
_llseek(3, 0, [7852], SEEK_END)         = 0
mmap2(NULL, 7852, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7735000
munmap(0xb7735000, 7852)                = 0
close(3)                                = 0
open("/usr/share/ImageMagick-6.2.8/config/delegates.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/doc/ImageMagick-6.2.8/delegates.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/ImageMagick-6.2.8/delegates.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/root/.magick/delegates.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
brk(0x91d0000)                          = 0x91d0000
brk(0x91f1000)                          = 0x91f1000
stat64("jpg:", 0xbff14220)              = -1 ENOENT (No such file or directory)
stat64("jpg:", 0xbff14220)              = -1 ENOENT (No such file or directory)
stat64("jpg:", 0xbff14220)              = -1 ENOENT (No such file or directory)
stat64("jpg:", 0xbff14220)              = -1 ENOENT (No such file or directory)
stat64("jpg:", 0xbff14220)              = -1 ENOENT (No such file or directory)
stat64("jpg:", 0xbff14220)              = -1 ENOENT (No such file or directory)
stat64("/tmp/lrg_out.jpeg", {st_mode=S_IFREG|0640, st_size=1843607, ...}) = 0
stat64("/tmp/lrg_out.jpeg", {st_mode=S_IFREG|0640, st_size=1843607, ...}) = 0
stat64("/tmp/lrg_out.jpeg", {st_mode=S_IFREG|0640, st_size=1843607, ...}) = 0
stat64("/tmp/lrg_out.jpeg", {st_mode=S_IFREG|0640, st_size=1843607, ...}) = 0
times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 1249933320
times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 1249933320
stat64("/tmp/lrg_out.jpeg", {st_mode=S_IFREG|0640, st_size=1843607, ...}) = 0
open("/tmp/lrg_out.jpeg", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0640, st_size=1843607, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7736000
read(3, "\377\330\377\340\0\20JFIF\0\1\1\1\1,\1,\0\0\377\333\0C\0\6\4\5\6\5\4\6"..., 4096) = 4096
_llseek(3, 0, [0], SEEK_SET)            = 0
mmap2(NULL, 1843607, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6be8000
close(3)                                = 0
munmap(0xb7736000, 4096)                = 0
msync(0xb6be8000, 1843607, MS_SYNC)     = 0
munmap(0xb6be8000, 1843607)             = 0
open("/usr/lib/ImageMagick-6.2.8/config/magic.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/ImageMagick-6.2.8/config/magic.xml", O_RDONLY|O_LARGEFILE) = 3
_llseek(3, 0, [5192], SEEK_END)         = 0
mmap2(NULL, 5192, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7735000
munmap(0xb7735000, 5192)                = 0
close(3)                                = 0
open("/usr/share/doc/ImageMagick-6.2.8/magic.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/ImageMagick-6.2.8/magic.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/root/.magick/magic.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 1249933320
times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 1249933320
stat64("/tmp/lrg_out.jpeg", {st_mode=S_IFREG|0640, st_size=1843607, ...}) = 0
open("/tmp/lrg_out.jpeg", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0640, st_size=1843607, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7736000
read(3, "\377\330\377\340\0\20JFIF\0\1\1\1\1,\1,\0\0\377\333\0C\0\6\4\5\6\5\4\6"..., 4096) = 4096
_llseek(3, 0, [0], SEEK_SET)            = 0
mmap2(NULL, 1843607, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6be8000
close(3)                                = 0
munmap(0xb7736000, 4096)                = 0
mmap2(NULL, 78070720, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xb2173000
msync(0xb6be8000, 1843607, MS_SYNC)     = 0
munmap(0xb6be8000, 1843607)             = 0
stat64("/tmp/lrg_out.jpeg", {st_mode=S_IFREG|0640, st_size=1843607, ...}) = 0
times({tms_utime=20, tms_stime=5, tms_cutime=0, tms_cstime=0}) = 1249933386
times({tms_utime=20, tms_stime=5, tms_cutime=0, tms_cstime=0}) = 1249933386
mmap2(NULL, 19699200, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xb0ea9000
times({tms_utime=20, tms_stime=7, tms_cutime=0, tms_cstime=0}) = 1249933393
times({tms_utime=20, tms_stime=7, tms_cutime=0, tms_cstime=0}) = 1249933393
mmap2(NULL, 39219200, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xae942000
+++ killed by SIGKILL +++

bugman
Posts: 7
Joined: 2013-09-30T08:38:18-07:00
Authentication code: 6789

Re: mogrify dies without

Post by bugman »

I've also figured that resizing starts crashing after breaching some threshold (around 800 pixeles in my case):

Code: Select all

[root@bugman artviktor.ru]# mogrify -resize 1280 -format jpg -quality 70 -verbose /tmp/lrg_out.jpeg 
/tmp/lrg_out.jpeg JPEG 2548x3064 2548x3064+0+0 PseudoClass 256c 1.8mb 
Killed
[root@bugman artviktor.ru]# mogrify -resize 1000 -format jpg -quality 70 -verbose /tmp/lrg_out.jpeg 
/tmp/lrg_out.jpeg JPEG 2548x3064 2548x3064+0+0 PseudoClass 256c 1.8mb 0.250u 0:03
Killed
[root@bugman artviktor.ru]# mogrify -resize 800 -format jpg -quality 70 -verbose /tmp/lrg_out.jpeg 
/tmp/lrg_out.jpeg JPEG 2548x3064 2548x3064+0+0 PseudoClass 256c 1.8mb 0.250u 0:02
/tmp/lrg_out.jpeg=>/tmp/lrg_out.jpg JPEG 2548x3064=>800x962 800x962+0+0 DirectClass 96kb 0.840u 0:02
[root@bugman artviktor.ru]# mogrify -resize 850 -format jpg -quality 70 -verbose /tmp/lrg_out.jpeg 
/tmp/lrg_out.jpeg JPEG 2548x3064 2548x3064+0+0 PseudoClass 256c 1.8mb 0.260u 0:03
Killed
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: mogrify dies with no reason

Post by fmw42 »

mogrify -resize 1280 -format jpg -quality 70 /tmp/lrg_out.jpeg
I suspect that you do not fully understand the mogrify syntax.

mogrify is usually used for more that one input and output image and one does not usually specify an exact file name, since mogrify takes the input filenames and uses it for the output file names. Your command looks like it is using just one input image, /tmp/lrg_out.jpeg. I do not think you can specify the input directory that way. You need to cd to the current directory. If you want the output in a new directory you need to use the -path option. I think you may have confused the input and output parts of the mogrify command. Are you trying to read or write to /tmp/lrg_out.jpeg?

see
http://www.imagemagick.org/Usage/basics/#mogrify


If you are using just one image, why not just use convert

convert input -resize 1280 -quality 70 output
bugman
Posts: 7
Joined: 2013-09-30T08:38:18-07:00
Authentication code: 6789

Re: mogrify dies with no reason

Post by bugman »

fmw42, first of all, thanks for your reply

The way I'm using mogrify is within the boundaries of use cases - http://www.imagemagick.org/script/mogrify.php
See the example in the docs, where mogrify is executed against single file

> Are you trying to read or write to /tmp/lrg_out.jpeg?
As per parameters, it should read from /tmp/lrg_out.jpeg and write to /tmp/lrg_out.jpg

I strongly believe that issue is lying somewhere in the field of memory allocation, because as you can see from my latest update conversion works until some moment (some particular size actually).
I'll try with convert, as per your advice
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: mogrify dies with no reason

Post by fmw42 »

you may be running out of space in /tmp. try some other directory.

But I am still not sure you can specify the directory the way you do. I always thought mogrify works on the current directory and writes to the directory specified by -path. But I could be wrong, if you say it works on some files.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: mogrify dies with no reason

Post by fmw42 »

Does this work

cd /tmp
mogrify -resize 1280 -format jpg -quality 70 lrg_out.jpeg
bugman
Posts: 7
Joined: 2013-09-30T08:38:18-07:00
Authentication code: 6789

Re: mogrify dies with no reason

Post by bugman »

It's crashing with same sympthoms:

Code: Select all

[root@bugman victor]# mogrify -resize 1280 -format jpg -quality 70 out.jpeg
Killed
[root@bugman victor]# convert out.jpeg -resize 1280 -quality 70 out.jpg
Killed
Once again, pls, don't be confused with filenames I use with this example (they just happened to appear during my tests): out.jpeg is SOURCE file name, out.jpg is name for DESTINATION file.

The example of exetution under the directory with source file:

Code: Select all

[root@bugman victor]# cd /tmp
[root@bugman tmp]# ls
out.jpeg
[root@bugman tmp]# mogrify -resize 1280 -format jpg -quality 70 out.jpeg 
Killed
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: mogrify dies with no reason

Post by magick »

Check your /tmp partition. Its likely its nearly out of space. You could also try adding -define jpeg:size=1280 to your command line to reduce the resource requirements of your image.
bugman
Posts: 7
Joined: 2013-09-30T08:38:18-07:00
Authentication code: 6789

Re: mogrify dies with no reason

Post by bugman »

> you may be running out of space in /tmp. try some other directory.

I thought that too, but have checked already - the whole root filesystem is mounted from single device (I'm practicing on quite weak virtual server, but still)

Code: Select all

[root@bugman tmp]# df -h /tmp/
Filesystem            Size  Used Avail Use% Mounted on
/dev/simfs            6.0G  3.6G  2.5G  59% /
[root@bugman tmp]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/simfs            6.0G  3.6G  2.5G  59% /
none                  128M  4.0K  128M   1% /dev
Once again (pls see the reply #3 - viewtopic.php?f=3&t=24178&p=103313#p103303), while being played with -resize parameter I've figured that after some point (less or equal than 800 pixels) it works without crashes. That's why my main suspec is not the others but some bug / memory issue I'm hitting
bugman
Posts: 7
Joined: 2013-09-30T08:38:18-07:00
Authentication code: 6789

Re: mogrify dies with no reason

Post by bugman »

>You could also try adding -define jpeg:size=1280 to your command line to reduce the resource requirements of your image.

Nopes, unfortunately that doesn't work:

Code: Select all

[root@bugman victor]# mogrify -resize 1280 -format jpg -quality 70 out.jpeg 
Killed
[root@bugman victor]# mogrify -resize 1280 -format jpg -quality 70 -define jpeg:size=1280 out.jpeg 
Killed
I don't think the issue is connected to tmp space - as you can see I have 2.5 Gb free, that much should be enough to resize down 2 Mb jpeg file.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: mogrify dies with no reason

Post by fmw42 »

Did you try doing it in some other directory? Might there be some corruption in your jpg file? Did you try some other file of about the same size?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: mogrify dies with no reason

Post by magick »

The -define must come before the image filename on the command-line. What version of IM are you using? We're using ImageMagick 6.8.7. Post a URL to your image. Let's see if we can reproduce the problem.
Post Reply