/bin/more 을 실행하면, Segmentation fault (core dumped) 가 됩니다.

ratsbomb의 이미지

안녕하세요?

우분투 7.04를 사용중이고요.
more를 실행하면, Segmentation fault (core dumped)가 됩니다.

andrew@andrew-desktop:~$ /bin/more 
Segmentation fault (core dumped)

쉘스크립트 작성시에 more로 화면을 출력하는 부분이 있어서, 계속 Segmentation fault (core dumped)가 뜨길래,
스크립트에 문제가 있나 싶었더니, 원래 /bin/more에 문제가 있는 것 같습니다.

이런 상황에서는 어떻게 해결해야 하는지요? ^^;

그럼, 리눅스 유저분들의 도움 부탁드립니다.

bushi의 이미지

/usr/bin/less

=.=
more 에 문제가 없다고 말하긴 어렵지만, 다른 요인도 있는 것 같습니다.
보통 core dump 는 비활성화 되어 있을텐데... 어떤 환경인지 짐작키 어렵네요.

wariua의 이미지

core dump가 비활성화 되어 있어도 "(core dumped)"라는 메시지는 출력되기 때문에 꼭 특별한 환경이어서 그런 것 같지는 않습니다.

저도 7.04를 사용합니다. 다음은 제 PC(i386)에 설치된 more 프로그램의 정보입니다.

$ ls -l /bin/more
-rwxr-xr-x 1 root root 26872 ... /bin/more
$ md5sum /bin/more
4ea396ca587030c4082b31725d43ee9b  /bin/more
$ ldd /bin/more
        linux-gate.so.1 =>  (0xffffe000)
        libncurses.so.5 => /lib/libncurses.so.5 (0xb7f5e000)
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e1d000)
        libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7e18000)
        /lib/ld-linux.so.2 (0xb7fb5000)
$ apt-cache showpkg util-linux
Package: util-linux
Versions:
2.12r-17ubuntu2 (...) ...
...

----
$PWD `date`

$PWD `date`

bushi의 이미지

fc5 사용합니다.

[bushi@rose net]$ ulimit -c
0
[bushi@rose net]$ cat sf.c
int main(int argc, char **argv)
{
        char *buf = 0;
        *buf = 0;
        return 0;
}
[bushi@rose net]$ gcc -s -o sf sf.c -Wall
[bushi@rose net]$
[bushi@rose net]$ ./sf
세그멘테이션 오류
[bushi@rose net]$
[bushi@rose net]$ ulimit -c 1000000
[bushi@rose net]$
[bushi@rose net]$ ./sf
세그멘테이션 오류 (core dumped)
[bushi@rose net]$
[bushi@rose net]$ LANG=C
[bushi@rose net]$ ./sf
Segmentation fault (core dumped)
[bushi@rose net]$

wariua의 이미지

이게 또 배포판마다 살짝 다른가 보네요. ubuntu 7.04에서는 ulimit -c 결과가 0일 때 "(core dumped)"가 출력되면서도 코어 파일이 생성되지 않는 방식으로 동작하네요. fc5의 방식이 상식(?)에 맞는 것 같은데 우분투는 왜 이런 방식으로 동작하는지 궁금해지네요. 설마 "메시지를 구별해서 출력하기가 귀찮았다"라거나...
----
$PWD `date`

$PWD `date`

ratsbomb의 이미지

ldd로 출력정보도 정상적으로 나오지 않는 군요.
다시 설치해야 할 것 같은데, 어떻게 해야할까요?
/usr/bin/less는 문제가 없습니다.

andrew@andrew-desktop:~$ ldd /bin/more
ldd: exited with unknown exit code (139)

/**
* We need Divide and Conquer 美德
* @return Nothing
*/

白頭山石磨刀盡,豆滿江水飮馬無,男兒二十未平國,後世誰稱大丈夫

feanor의 이미지

신뢰할 수 있는 출처에서 util-linux 패키지를 받아 dpkg로 다시 설치하세요.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.