Sometimes you get bugs that just are real headscratchers. This happens at the beginning of your career, at the end, and all the way through. There's some subtle thing keeping your code from working, even though you've gone through all the guides, stack overflow, and code review you can handle. Examples of issues like this are bugs in other people's code, library incompatibilities, timing issues, and generally trying to do anything.
You really need a lot of patience and a good problem solving attitude to solve these problems and keep going. Some people are lucky and look more productive because they don't run into these problems as often (though they do run into them). But you learn a lot more by solving these issues and understanding random parts of the stack.
To do this you really need to understand the entire system and use your tools. You need to understand things like how the OS might be doing things, how memory works, how threads work, how drivers work, etc.
If you just sit there and get frustrated, you can put in all the time in the world and not come up with the solution. You need an engineering/builder mentality right from the start, IMHO.