Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log corruption lseek workaround #688

Merged
merged 2 commits into from
Mar 1, 2014
Merged

log corruption lseek workaround #688

merged 2 commits into from
Mar 1, 2014

Conversation

LorenzMeier
Copy link
Member

  • Code style fixes (authors should be in the doxygen section)
  • Using lseek... to attempt to work around log corruption.

THIS IS UNTESTED, but Tridge did have some success for read fails, so we might well have some luck for writes as temporary workaround.

@@ -450,6 +449,7 @@ static void *logwriter_thread(void *arg)
n = available;
}

lseek(log_fd, 0, SEEK_CUR);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes a flush and quite possibly creates an entirely new cluster chain for the file in some cases. If this helps, it should be combined with a check for 'lost clusters' on systems that have been seeing issues.

@julianoes
Copy link
Contributor

I flew two batteries on fixedwing and FMUv1 and all logfiles are ok! Without this patch, they had been corrupted, every time.

@julianoes
Copy link
Contributor

Tested on bench on FMUv2 too, merging!

julianoes added a commit that referenced this pull request Mar 1, 2014
log corruption lseek workaround
@julianoes julianoes merged commit 3dd3ba4 into master Mar 1, 2014
@julianoes julianoes deleted the sdlog2_fix branch March 1, 2014 09:36
PX4BuildBot pushed a commit that referenced this pull request Jul 20, 2018
NuttX:
 - https://github.com/PX4-NuttX/nuttx/tree/px4-master_auto_rebase
 - PX4/NuttX@7557b30

Changes from PX4-NuttX/nuttx (PX4/NuttX@8957a02) in current PX4/master (89a9025)
PX4/NuttX@8957a02...7557b30

7557b30 (HEAD, origin/px4-master_auto_rebase) [PX4: WIP] Fix transmission status handling in the serial interrupt
d1e8245 [PX4: REJECTED] cstdint fix
b028c8c [PX4: REJECTED] add math.h
ffdec12 [PX4: WIP] Jenkinsfile
7d96a2b (origin/master) configs/lpcxpresso-lpc54628/lvgl: Update lvgl board config to use the new version
12d216f Fix another error found in build testing.
e9cd608 Merged in david_s5/nuttx/master_kinetis_usbhang (pull request #688)
2ea49cd Fix another error found in build testing.
58bbb66 libs/libc/stdlib and include/stdlib.h:  Add implementation of random() and srandom().
ac56182 Fix some errors in last commits found in build testing.

Apps:
 - https://github.com/PX4-NuttX/apps/tree/px4-master_auto_rebase
 - PX4/NuttX-apps@01e8a92

Changes from PX4-NuttX/apps (PX4/NuttX-apps@36806ba) in current PX4/master (89a9025)
PX4/NuttX-apps@36806ba...01e8a92

01e8a92 (HEAD -> px4-master_auto_rebase, origin/px4-master_auto_rebase) [REJECTED] add-var-expansion-in-nsh-parse.patch
3cc79be (origin/master) examples/lvgldemo/ and graphics/littlevgl/:  pdate LVGL to version 5.1.1
1030ea7 Merged in masayuki2009/nuttx.apps/fix_mksymtab (pull request #147)
cb9e951 apps/Make.defs:  Improve the symtab target.  tools/mksymtab.sh:  Fix a typo.
296f583 apps/tools:  Forgot to include a file with last commit.
272bdc0 apps Makesystem:  Fix an error when building apps/ withtout nuttx/, using only the NuttX export package only and assuming that the nuttx/ directory in not even present.  In this case, the problem fixed where the apps/Make.defs file was selecting tools from the /tools directory which does not exist because TOPDIR=apps/import.  Instead, for this build case, I have not thought of any option but to duplicate scripts as necessary in the apps/tools directory.  Also added a top-level target to compile the symbol table.  Misc fixes: quoting in scripts, some errors in script syntax.
9240ef5 Merged in masayuki2009/nuttx.apps/fix_symtab_related (pull request #146)
4db29bc apps/examples/elf:  Correct some Kconfig coments.
2ecc94f apps/import/Makefile:  Eliminate a MAKE sytax error that occurs in some (but not environments) when symtab.c has not been generated.
878fa8a Squashed commit of the following:
PX4BuildBot pushed a commit that referenced this pull request Jul 20, 2018
NuttX:
 - https://github.com/PX4-NuttX/nuttx/tree/px4-master_auto_rebase
 - PX4/NuttX@477ad74

Changes from PX4-NuttX/nuttx (PX4/NuttX@8957a02) in current PX4/master (345f636)
PX4/NuttX@8957a02...477ad74

477ad74 (HEAD, origin/px4-master_auto_rebase) [PX4: WIP] Fix transmission status handling in the serial interrupt
3d3822a [PX4: REJECTED] cstdint fix
9eb8510 [PX4: REJECTED] add math.h
ba35898 [PX4: WIP] Jenkinsfile
d291cb8 (origin/master) Merged in masayuki2009/nuttx.nuttx/fix_syscall (pull request #690)
9ea6d9a Merged in masayuki2009/nuttx.nuttx/lc823450_protected_build (pull request #689)
7d96a2b configs/lpcxpresso-lpc54628/lvgl: Update lvgl board config to use the new version
12d216f Fix another error found in build testing.
e9cd608 Merged in david_s5/nuttx/master_kinetis_usbhang (pull request #688)
2ea49cd Fix another error found in build testing.

Apps:
 - https://github.com/PX4-NuttX/apps/tree/px4-master_auto_rebase
 - PX4/NuttX-apps@01e8a92

Changes from PX4-NuttX/apps (PX4/NuttX-apps@36806ba) in current PX4/master (345f636)
PX4/NuttX-apps@36806ba...01e8a92

01e8a92 (HEAD -> px4-master_auto_rebase, origin/px4-master_auto_rebase) [REJECTED] add-var-expansion-in-nsh-parse.patch
3cc79be (origin/master) examples/lvgldemo/ and graphics/littlevgl/:  pdate LVGL to version 5.1.1
1030ea7 Merged in masayuki2009/nuttx.apps/fix_mksymtab (pull request #147)
cb9e951 apps/Make.defs:  Improve the symtab target.  tools/mksymtab.sh:  Fix a typo.
296f583 apps/tools:  Forgot to include a file with last commit.
272bdc0 apps Makesystem:  Fix an error when building apps/ withtout nuttx/, using only the NuttX export package only and assuming that the nuttx/ directory in not even present.  In this case, the problem fixed where the apps/Make.defs file was selecting tools from the /tools directory which does not exist because TOPDIR=apps/import.  Instead, for this build case, I have not thought of any option but to duplicate scripts as necessary in the apps/tools directory.  Also added a top-level target to compile the symbol table.  Misc fixes: quoting in scripts, some errors in script syntax.
9240ef5 Merged in masayuki2009/nuttx.apps/fix_symtab_related (pull request #146)
4db29bc apps/examples/elf:  Correct some Kconfig coments.
2ecc94f apps/import/Makefile:  Eliminate a MAKE sytax error that occurs in some (but not environments) when symtab.c has not been generated.
878fa8a Squashed commit of the following:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants