传真:efix 分段错误

传真:efix 分段错误

我在让 efax 在 Ubuntu server 12.04.1 LTS 上运行方面遇到了一些问题。有时传真发送会给出“信号终止”错误,有时它似乎可以工作,但它总是给出警告:“仅从输入文件中读取 0 个字节,假设为文本”。另一端什么也没有传过来。

# fax send ----------- fax-test.txt
fax-test.txt.nnn is up-to-date
efax: Fri Dec 28 13:45:46 2012 efax v 0.9a-001114 Copyright 1999 Ed Casas
efax: 45:46 Warning: only read 0 byte(s) from input file, assuming text
efax: 45:46 opened /dev/ttyACM0
efax: 45:46 Warning: unexpected response "OK"
efax: 45:48 using U.S. Robotics 56K FAX USB V1.1.0 in class 1
efax: 45:48 dialing T-----------
efax: 46:03 connected
efax: 46:05 received UNKNOWN
efax: 46:05 Warning: bit-reversed HDLC frame, reversing bit order
efax: 46:05 remote ID -> ----------          
efax: 46:05 received DIS - answering capabilities
efax: 46:05 remote has no document(s) to send, and can receive
efax: 46:05 local   196lpi 14.4kbps 8.5"/215mm  any   1D    -     -  0ms
efax: 46:05 remote  196lpi  9600bps  12"/303mm  any   1D ECM-64   -  0ms
efax: 46:05 session 196lpi  9600bps 8.5"/215mm  any   1D    -     -  0ms
efax: 46:06 sent TSI - caller ID
efax: 46:06 sent DCS - session format
efax: 46:09 sent TCF - channel check of 1800 bytes
efax: 46:11 received CFR - channel OK
efax: 46:12 header:[2012/12/28 13:45 +1 778 478 0306 Jon Hulka p. 1/1]
efax: 46:12 Error: terminating on signal 8
efax: 46:12 failed -> fax-test.txt.001
efax: 46:13 done, returning 5 (terminated by signal)
There were errors (see T-----------.efax.log). 
# ls -l
total 20
-rw-rw-r-- 1 jon jon   61 Dec 24 13:43 fax-test.txt
-rw-rw-r-- 1 jon jon    0 Dec 28 13:37 fax-test.txt.001

我尝试运行“fax make”和“efix”,但都出现了分段错误:

# strace -f efix fax-test.txt
execve("/usr/bin/efix", ["efix", "fax-test.txt"], [/* 20 vars */]) = 0
brk(0)                                  = 0x915e000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77d2000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=30093, ...}) = 0
mmap2(NULL, 30093, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77ca000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\226\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1730024, ...}) = 0
mmap2(NULL, 1743580, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb1b000
mprotect(0xcbe000, 4096, PROT_NONE)     = 0
mmap2(0xcbf000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a3) = 0xcbf000
mmap2(0xcc2000, 10972, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xcc2000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77c9000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb77c9900, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xcbf000, 8192, PROT_READ)     = 0
mprotect(0xae9000, 4096, PROT_READ)     = 0
munmap(0xb77ca000, 30093)               = 0
time(NULL)                              = 1356731733
brk(0)                                  = 0x915e000
brk(0x917f000)                          = 0x917f000
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2875, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=2875, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77d1000
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0"..., 4096) = 2875
_llseek(3, -24, [2851], SEEK_CUR)       = 0
read(3, "\nPST8PDT,M3.2.0,M11.1.0\n", 4096) = 24
close(3)                                = 0
munmap(0xb77d1000, 4096)                = 0
write(2, "efix: Fri Dec 28 13:55:33 2012 e"..., 66efix: Fri Dec 28 13:55:33 2012 efix v 0.3 Copyright 1999 Ed Casas
) = 66
open("fax-test.txt", O_RDONLY)          = 3
fstat64(3, {st_mode=S_IFREG|0664, st_size=61, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77d1000
read(3, "This is a test fax. Did it get t"..., 4096) = 61
read(3, "", 4096)                       = 0
_llseek(3, 0, [0], SEEK_SET)            = 0
read(3, "This is a test fax. Did it get t"..., 4096) = 61
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb77d1000, 4096)                = 0
open("fax-test.txt", O_RDONLY)          = 3
fstat64(3, {st_mode=S_IFREG|0664, st_size=61, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77d1000
_llseek(3, 0, [0], SEEK_SET)            = 0
_llseek(1, 0, 0xbfbe4af0, SEEK_SET)     = -1 ESPIPE (Illegal seek)
read(3, "This is a test fax. Did it get t"..., 4096) = 61
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)

我是否忘记安装某些东西了?

答案1

我已经提交了错误报告使用 Ubuntu。

我通过替换有缺陷的 efix 二进制文件解决了该问题:

在命令 shell 中:

  • tar -xzf efax-0.9a-001114.tar.gz
  • cd efax-0.9a-001114
  • 制作
  • sudo cp efix /usr/bin/efix

相关内容