PaddleSeg icon indicating copy to clipboard operation
PaddleSeg copied to clipboard

Segmentation fault (core dumped)

Open jdyjjj opened this issue 2 years ago • 3 comments

问题确认 Search before asking

Bug描述 Describe the Bug

python: class Predictor: def predict(self, processed_img):

    input_names = self.predictor.get_input_names()
    input_handle = self.predictor.get_input_handle(input_names[0])

    processed_img = np.expand_dims(processed_img, 0)
    input_handle.reshape(processed_img.shape)
    input_handle.copy_from_cpu(processed_img)

    self.predictor.run()

    output_names = self.predictor.get_output_names()
    output_handle = self.predictor.get_output_handle(output_names[0])
    output = output_handle.copy_to_cpu()

    return (np.argmax(output.squeeze(), axis=0)*255).astype('uint8')

the problem comes in "self.predictor.run()"

bug:

C++ Traceback (most recent call last):

No stack trace in paddle, may be caused by external reasons.


Error Message Summary:

FatalError: Segmentation fault is detected by the operating system. [TimeInfo: *** Aborted at 1685362505 (unix time) try "date -d @1685362505" if you are using GNU date ***] [SignalInfo: *** SIGSEGV (@0x0) received by PID 8826 (TID 0x7fe4ca50b740) from PID 0 ***]

Segmentation fault (core dumped)

复现环境 Environment

os: linux paddlepaddle-gpu 2.4.0 python 3.7.12 CUDA: 11.4

Bug描述确认 Bug description confirmation

  • [X] 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • [ ] 我愿意提交PR!I'd like to help by submitting a PR!

jdyjjj avatar May 29 '23 12:05 jdyjjj

There are a bunch of reasons causing a segmentation fault, and I think the first thing is to check if the inference library is perperly built on your machine. Please run this demo to do the check.

Bobholamovic avatar May 31 '23 02:05 Bobholamovic

我也遇到了同样的问题

GDbbq avatar Jul 26 '23 02:07 GDbbq

@GDbbq 可以前往Paddle Issue区提问。

shiyutang avatar Feb 27 '24 12:02 shiyutang