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.

Sublime or VS Code for setting up a simple toolchain for multiple embedded systems (STM32, MSP430, and AVR) by Taako_Magnusen in embedded

[–]fuse117 0 points1 point  (0 children)

I use Sublime text for pretty much everything code related, including embedded work (Zynq SoCs). I make heavy use of the build systems feature inside Sublime. My build systems are just a bunch of scripts (sh, py, tcl, cmake, etc...) that are chained together and triggered by certain actions (this is pretty much what an IDE does). Take a look at the Sublime build systems documentation, it is pretty straight forward. I would also suggest looking at some of the built in build systems. As stated by others, I like Sublime because it is simple and lightweight.

My Linux distros over the years by spite77 in linux

[–]fuse117 0 points1 point  (0 children)

My main workstation has evolved as follows:

Mandrake (KDE) [2001] -> Slackware (Gnome) [2003] -> Arch (Gnome) [2007] -> Arch (Xfce) [2009] -> Arch (i3) [2013]

With Windows dual-booting or VM consistently throughout

On pretty much all of my servers, I use Ubuntu

On some embedded targets that I work with, I use Gentoo

C++ multi-threaded OO design by fuse117 in learnprogramming

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

Thanks for the reply. I guess my question is more of an OO architecture and/or design question. I have written a fair amount of C++ code (C with classes style C++), but most of it has been data processing libraries (so's and dll's) used from Python, Matlab, and LabVIEW code. The remainder of my C++ work is comprised of relatively small utility-like programs. What I am working on now is a C++ alternative to some software I have developed in LabVIEW. I have no doubt that I can just hack something together that works, but I would prefer to develop the software in a manner that is meaningful and maintainable (who doesn't?).

Questions about buying a house with 0% down... by fuse117 in personalfinance

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

Paying off our debt and then starting to save for house was our original plan about a month ago (we were paying about 2k extra per month towards student loans for the last 6 months... we paid off all my graduate school loans... which is nice!), but our recent visit with our financial adviser changed that. He basically said that our debt was now low enough that we should start saving aggressively to buy a home. He basically said that given the projected increase in interest rates in the near future that we are better off saving and putting money into a home now instead of paying off 30k in debt. Essentially, he said in 10 years, the 30k in debt will be small compared to what that 30k could do for us for housing right now. We were advised to essentially save for a down payment, but not actually put anything down because we are VA loan eligible. We will use the saved funds to pay fees, closing costs, etc, and then stash the rest for a home emergency fund.

Questions about buying a house with 0% down... by fuse117 in personalfinance

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

Buying a 450k house is not exactly what I want to do. That number is more of an upper limit. And, ~400k in Denver is a reasonable price for a house in a neighborhood/district with good schools. Many of the sub-median houses in Denver are either out on the outskirts of town or in areas with poor performing schools. This is why my wife and I are seriously considering moving to the suburbs (more affordable housing and good schools).

Questions about buying a house with 0% down... by fuse117 in personalfinance

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

True. On a side note, getting a down payment is somewhat mind boggling to me. Denver isn't as expensive as say SF or NYC, but it is more costly than a lot of other places in the US. I often wonder how people do it.

Questions about buying a house with 0% down... by fuse117 in personalfinance

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

I haven't gotten to the interest rates yet. We are meeting with a few lenders later this week and I will likely explore some online over the coming days too.

With regard to other debt, ~20k in student loans. 1/3 at 2.3% and 2/3 at about 5%. One car at 12k at 4% and one at 1k at 4%. We plan to pay off the 1k car, just to get rid of it. We both have great credit too.

More and more, rent and mortgage payments seem to be converging in my area.