Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Stack Smashing Detected

Stack Smashing Detected 13 years 7 months ago #951

  • dannyboi83
  • dannyboi83's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 40
  • Karma: 0
Hi,

I am working on a small project that will involve a modbus/TCP device, to make sure it is working I am just monitoring one of the channels and displaying it on a graph. I have built the project but when running the following is displayed:
[code:1]
I Reading Boot file /usr/local/pwrp/sensormonitor/bld/common/load/ld_boot_dcarr-ubuntu-desktop_0999.dat
I Created at 03-SEP-2010 11:16:31.58 for project: sensormonitor
I This node vill run PLC file: plc_dcarr-ubuntu-desktop_0999_00002
I This node has node identity 0.1.1.2 (65794)
*** stack smashing detected ***: rt_ini terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x50)[0x587390]
/lib/tls/i686/cmov/libc.so.6(+0xe233a)[0x58733a]
rt_ini[0x80ce7c4]
rt_ini[0x8051efa]
rt_ini[0x804ab81]
rt_ini[0x804a9ff]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x4bbbd6]
rt_ini[0x804a8c1]
======= Memory map: ========
00145000-00169000 r-xp 00000000 08:11 19267682 /lib/tls/i686/cmov/libm-2.11.1.so
00169000-0016a000 r--p 00023000 08:11 19267682 /lib/tls/i686/cmov/libm-2.11.1.so
0016a000-0016b000 rw-p 00024000 08:11 19267682 /lib/tls/i686/cmov/libm-2.11.1.so
004a5000-005f8000 r-xp 00000000 08:11 19267633 /lib/tls/i686/cmov/libc-2.11.1.so
005f8000-005f9000 ---p 00153000 08:11 19267633 /lib/tls/i686/cmov/libc-2.11.1.so
005f9000-005fb000 r--p 00153000 08:11 19267633 /lib/tls/i686/cmov/libc-2.11.1.so
005fb000-005fc000 rw-p 00155000 08:11 19267633 /lib/tls/i686/cmov/libc-2.11.1.so
005fc000-005ff000 rw-p 00000000 00:00 0
00640000-0065d000 r-xp 00000000 08:11 19267667 /lib/libgcc_s.so.1
0065d000-0065e000 r--p 0001c000 08:11 19267667 /lib/libgcc_s.so.1
0065e000-0065f000 rw-p 0001d000 08:11 19267667 /lib/libgcc_s.so.1
00a38000-00a39000 r-xp 00000000 00:00 0 [vdso]
00abf000-00ac6000 r-xp 00000000 08:11 19267747 /lib/tls/i686/cmov/librt-2.11.1.so
00ac6000-00ac7000 r--p 00006000 08:11 19267747 /lib/tls/i686/cmov/librt-2.11.1.so
00ac7000-00ac8000 rw-p 00007000 08:11 19267747 /lib/tls/i686/cmov/librt-2.11.1.so
00cd0000-00ceb000 r-xp 00000000 08:11 19271610 /lib/ld-2.11.1.so
00ceb000-00cec000 r--p 0001a000 08:11 19271610 /lib/ld-2.11.1.so
00cec000-00ced000 rw-p 0001b000 08:11 19271610 /lib/ld-2.11.1.so
00e8c000-00ea1000 r-xp 00000000 08:11 19267741 /lib/tls/i686/cmov/libpthread-2.11.1.so
00ea1000-00ea2000 r--p 00014000 08:11 19267741 /lib/tls/i686/cmov/libpthread-2.11.1.so
00ea2000-00ea3000 rw-p 00015000 08:11 19267741 /lib/tls/i686/cmov/libpthread-2.11.1.so
00ea3000-00ea5000 rw-p 00000000 00:00 0
08048000-080e4000 r-xp 00000000 08:11 7736794 /usr/pwr47/os_linux/hw_x86/exp/exe/rt_ini
080e4000-080e5000 r--p 0009b000 08:11 7736794 /usr/pwr47/os_linux/hw_x86/exp/exe/rt_ini
080e5000-080e9000 rw-p 0009c000 08:11 7736794 /usr/pwr47/os_linux/hw_x86/exp/exe/rt_ini
080e9000-0811d000 rw-p 00000000 00:00 0
0946d000-0948e000 rw-p 00000000 00:00 0 [heap]
b706c000-b706d000 ---p 00000000 00:00 0
b706d000-b786f000 rw-p 00000000 00:00 0
b787d000-b7880000 rw-p 00000000 00:00 0
bff7a000-bff90000 rw-p 00000000 00:00 0 [stack]
[/code:1]

I have not come across this before and need some help. I have recently moved the project to a new PC, and all seems fine, but could this be the root of the problem. Thanks in advance for your help.

Dan
The administrator has disabled public write access.

Re:Stack Smashing Detected 13 years 7 months ago #952

  • robert
  • robert's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 178
  • Karma: 7
Hi dannyboi,

Which Ubuntu-version are you running ?
Did you build Proview from sources or did you install a package, in case you did - what version ?

Thanks.

/Robert
The administrator has disabled public write access.

Re:Stack Smashing Detected 13 years 7 months ago #953

  • dannyboi83
  • dannyboi83's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 40
  • Karma: 0
Hi Robert,

I am using ubuntu 10.04, and installed proview from the package download from sourceforge named pwr47_4.7.0-2ubuntu_i386.deb.

Thanks
Dan
The administrator has disabled public write access.

Re:Stack Smashing Detected 13 years 7 months ago #957

  • robert
  • robert's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 178
  • Karma: 7
Hmmm, I don't quite understand this. To get rid of this problem you usually need to recompile the program with a switch -fno-stack-protector. This is however generally not a good idea beacause this means a possible vulnerability.

Need to think a little bit on what's the best way to go. I will get back again. I mean you shouldn't really get this fault and the best would be to find the cause for it.

/Robert
The administrator has disabled public write access.

Re:Stack Smashing Detected 13 years 7 months ago #959

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi Dan,

I've found a bug for nodenames longer than 16 characters. A temporary fix to check if that is the problem is to shorten the name in the bootfile ($pwrp_load/ld_boot_... ), row 4, and try to start again.

/Claes
The administrator has disabled public write access.

Re:Stack Smashing Detected 13 years 7 months ago #960

  • dannyboi83
  • dannyboi83's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 40
  • Karma: 0
Hi Claes,

Thank you for your prompt reply, that does indeed seem to be the issue, I have shortened the name in row 4 and it worked. To get around this will I have to change my host name so that it is shorted than 16 characters, then redo the project (I am only right at the beginning), or is there a quick way of making the change.

Will the bootfile change each time i build the project?

Dan
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 9.209 seconds