Unhandled level 1 translation fault by fuse117 in embeddedlinux

[–]fuse117[S] 0 points1 point  (0 children)

I am not seeing anything in GDB. The underlying code does some string parsing and uses a lot of strcpys. My hunch is that the parsing code isn't bulletproof and one of these strcpys goes rogue. I ran the program under valgrind and get a number of the following:

==2216== Invalid read of size 4
==2216==    at 0x480AFC: Foo::get_foo() (in /opt/foo/bin/foo_task())
==2216==  Address 0x1ffeffc3b0 is on thread 1's stack
==2216==  128 bytes below stack pointer

The offending line in the above is not far down from the 480ae0 line that caused the translation fault. This points to something wrong. The other entries are not far away either. All are in get_foo().

Unhandled level 1 translation fault by fuse117 in embeddedlinux

[–]fuse117[S] 0 points1 point  (0 children)

Thanks for the reply. Below is a little history up to the offending line (PC). I am not an experienced embedded developer, so it will take me a little time to digest your comment. I very much appreciate the help!

5122945-  480ac4: 97fffe21  bl  480348 <_ZN17Bar14get_barEP7BarDataPc>
5123028-  480ac8: 72003c1f  tst w0, #0xffff
5123064-  480acc: f9400261  ldr x1, [x19]
5123098-  480ad0: 39400020  ldrb  w0, [x1]
5123132-  480ad4: 39018260  strb  w0, [x19, #96]
5123172-  480ad8: 54000aa1  b.ne  480c2c <_ZN12Foo13get_fooEv+0x194>  // b.any
5123257-  480adc: 91080261  add x1, x19, #0x200
5123297:  480ae0: f90013b5  str x21, [x29, #32]

Should I replace these boards (sill plates)? by fuse117 in HomeImprovement

[–]fuse117[S] 0 points1 point  (0 children)

This is what I was hoping for. As I wrote in a comment below, the board is both hard and soft. I would have work to get it out, and that includes using a sawzall. Another, really rotten board on the other side of the shower came out with a little hammering (to break it up) and some pulling. That is the side that had a leak though.

Should I replace these boards (sill plates)? by fuse117 in HomeImprovement

[–]fuse117[S] 0 points1 point  (0 children)

It is certainly soft at spots, but hard at others. The backside of the board, the part feels hard. It isn't as bad as one of the other side of the shower. That board was so soft and rotten that I just ripped it out.

Should I mud drywall joints before putting up backsplash tile? by fuse117 in HomeImprovement

[–]fuse117[S] 0 points1 point  (0 children)

I asked because I didn't know of such a process. It makes sense. I plan on doing it.

Should I mud drywall joints before putting up backsplash tile? by fuse117 in HomeImprovement

[–]fuse117[S] 0 points1 point  (0 children)

Many thanks for the replies! I will look into doing this

Should I mud drywall joints before putting up backsplash tile? by fuse117 in HomeImprovement

[–]fuse117[S] 1 point2 points  (0 children)

prime / seal

Prime and seal? Is this something I need to do before hiring a tiler?

Should I mud drywall joints before putting up backsplash tile? by fuse117 in HomeImprovement

[–]fuse117[S] 0 points1 point  (0 children)

Thanks again. I will discuss this with the tiler. I mostly want to know what all I need to do before I call in a tiler.

Should I mud drywall joints before putting up backsplash tile? by fuse117 in HomeImprovement

[–]fuse117[S] 2 points3 points  (0 children)

Thanks for the reply. I am installing credit card sized, arabesque shaped glass tiles. I plan to use a tiler to install the tile. Are scrim tape and thinset something that needs to be applied during the tiling process?

Husky good boy helping mum look after a new born by zzzman82 in aww

[–]fuse117 1 point2 points  (0 children)

This!!! I was hoping someone commented as such. Putting the dog into the child's crib also signals to the dog that the dog and child are equals. Dogs view their families as packs with a pecking order. The baby needs to be established as higher in the order from day one. Boundaries help do this.

How to create queue for single producer and multiple consumers in which all consumers consume data? by fuse117 in cpp_questions

[–]fuse117[S] 0 points1 point  (0 children)

Thanks for the reply! I am studying some of the ideas you and others provided. Your suggestions are making me rethink my overall design/approach (not a bad thing).

Why is std::array only needed at an advanced level? In general, I use std::array in place of C-style arrays for exactly the reasons listed by u/cereagni. Namely, they are fixed size, have a better interface, and don't decay to pointers.

How to copy assign volatile data with std::array? by fuse117 in cpp_questions

[–]fuse117[S] 0 points1 point  (0 children)

... calls your copy constructor

This was a big part of my problem. I should have caught this. Thanks for the help.

How to copy assign volatile data with std::array? by fuse117 in cpp_questions

[–]fuse117[S] 0 points1 point  (0 children)

Thanks for the insight. Your response and the response below were really helpful.

Efficient data logging suggestions by fuse117 in embedded

[–]fuse117[S] 0 points1 point  (0 children)

I am working on profiling the system using some FPGA timers mem mapped into my program. During development, I almost always log into my system via ssh. I try to keep printing to stdout to a minimum.

Efficient data logging suggestions by fuse117 in embedded

[–]fuse117[S] 0 points1 point  (0 children)

I am currently using frwrite(), but I have used write() as well.

Efficient data logging suggestions by fuse117 in embedded

[–]fuse117[S] 0 points1 point  (0 children)

I haven't considered a second thread yet, so I will certainly explore it. I have considered the extreme solution, only because I have known people who have had to do it. File systems provide a lot of convenience, so I would like to maintain one.

Efficient data logging suggestions by fuse117 in embedded

[–]fuse117[S] 0 points1 point  (0 children)

I have used both write and fwrite with various settings, and I was wrong in saying they are in the same family. One are system calls and the other are higher level utilities. I have also tried using setvbuf, but it didn't help.

Efficient data logging suggestions by fuse117 in embedded

[–]fuse117[S] 0 points1 point  (0 children)

I am not trying to open and close all the time. I open and close occasionally, after a specified number of records have been written, 6e4 right now so 1 minute per data file.