You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/06/24 10:25:17 UTC

[GitHub] [incubator-nuttx] anchao opened a new pull request #1293: sim: fix compile error caused by race condition

anchao opened a new pull request #1293:
URL: https://github.com/apache/incubator-nuttx/pull/1293


   ## Summary
    sim: fix compile error caused by race condition
   
   ```
   LD: nuttx.rel
   objcopy: couldn't open symbol redefinition file nuttx-names.dat (error: No such file or directory)
   Makefile: 297: recipe for target 'nuttx.rel' failed
   ```
   
   ## Impact
   
   ## Testing
   ```
   ./tools/configure.sh sim/nsh
   make -j16
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #1293: sim: fix compile error caused by race condition

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #1293:
URL: https://github.com/apache/incubator-nuttx/pull/1293#discussion_r444895987



##########
File path: arch/sim/src/Makefile
##########
@@ -316,7 +316,8 @@ export_startup: board/libboard$(LIBEXT) up_head.o $(HOSTOBJS)
 depend: .depend
 
 cleanrel:
-	$(Q) rm -f nuttx.rel nuttx-names.dat
+	$(call DELFILE, nuttx-names.dat)
+	$(call DELFILE, nuttx.rel)

Review comment:
       Okay.  Thanks for the explanation. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] anchao commented on a change in pull request #1293: sim: fix compile error caused by race condition

Posted by GitBox <gi...@apache.org>.
anchao commented on a change in pull request #1293:
URL: https://github.com/apache/incubator-nuttx/pull/1293#discussion_r444884467



##########
File path: arch/sim/src/Makefile
##########
@@ -316,7 +316,8 @@ export_startup: board/libboard$(LIBEXT) up_head.o $(HOSTOBJS)
 depend: .depend
 
 cleanrel:
-	$(Q) rm -f nuttx.rel nuttx-names.dat
+	$(call DELFILE, nuttx-names.dat)
+	$(call DELFILE, nuttx.rel)

Review comment:
       Race condition just in the order of deleting files, delete the nuttx.rel first will cause the target regeneration again, if the nuttx-names.dat deleted at this time, the compile will fail.
   
   ```
   nuttx.rel : libarch$(LIBEXT) board/libboard$(LIBEXT) nuttx-names.dat $(LINKOBJS)
     $(Q) echo "LD:  nuttx.rel"
    /*     nuttx-names.dat will be deleted at this phase    */
     $(Q) $(LD) -r $(LDLINKFLAGS) $(RELPATHS) $(EXTRA_LIBPATHS) -o $@ $(REQUIREDOBJS) $(LDSTARTGROUP) $(RELLIBS) $(EXTRA_LIBS) $(LDENDGROUP) $(LDUNEXPORTSYMBOLS)
   ifneq ($(HOSTOS),Darwin)
     $(Q) $(OBJCOPY) --redefine-syms=nuttx-names.dat $@  /* nuttx-names.dat has been deleted */
   endif
   ```
   
   
    nuttx-names.dat to be delete later 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] Ouss4 merged pull request #1293: sim: fix compile error caused by race condition

Posted by GitBox <gi...@apache.org>.
Ouss4 merged pull request #1293:
URL: https://github.com/apache/incubator-nuttx/pull/1293


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #1293: sim: fix compile error caused by race condition

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #1293:
URL: https://github.com/apache/incubator-nuttx/pull/1293#discussion_r444871961



##########
File path: arch/sim/src/Makefile
##########
@@ -316,7 +316,8 @@ export_startup: board/libboard$(LIBEXT) up_head.o $(HOSTOBJS)
 depend: .depend
 
 cleanrel:
-	$(Q) rm -f nuttx.rel nuttx-names.dat
+	$(call DELFILE, nuttx-names.dat)
+	$(call DELFILE, nuttx.rel)

Review comment:
       Would this fix a race condition issue?
   This change is okay by itself, but I don't see how it addresses a race condition. 
   Isn't line 293 that can cause such a problem?
   https://github.com/apache/incubator-nuttx/blob/d6a0da41d55d342aa5b434b98282c76cd996f1d3/arch/sim/src/Makefile#L293




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] anchao commented on a change in pull request #1293: sim: fix compile error caused by race condition

Posted by GitBox <gi...@apache.org>.
anchao commented on a change in pull request #1293:
URL: https://github.com/apache/incubator-nuttx/pull/1293#discussion_r444884467



##########
File path: arch/sim/src/Makefile
##########
@@ -316,7 +316,8 @@ export_startup: board/libboard$(LIBEXT) up_head.o $(HOSTOBJS)
 depend: .depend
 
 cleanrel:
-	$(Q) rm -f nuttx.rel nuttx-names.dat
+	$(call DELFILE, nuttx-names.dat)
+	$(call DELFILE, nuttx.rel)

Review comment:
       Race condition just in the order of deleting files, delete the nuttx.rel first will cause the target regeneration again, if the nuttx-names.dat deleted at this time, the compile will fail.
   
   ```
   nuttx.rel : libarch$(LIBEXT) board/libboard$(LIBEXT) nuttx-names.dat $(LINKOBJS)
     $(Q) echo "LD:  nuttx.rel"
    /*     nuttx-names.dat will be deleted at this phase    */
     $(Q) $(LD) -r $(LDLINKFLAGS) $(RELPATHS) $(EXTRA_LIBPATHS) -o $@ $(REQUIREDOBJS) $(LDSTARTGROUP) $(RELLIBS) $(EXTRA_LIBS) $(LDENDGROUP) $(LDUNEXPORTSYMBOLS)
   ifneq ($(HOSTOS),Darwin)
     $(Q) $(OBJCOPY) --redefine-syms=nuttx-names.dat $@  /* nuttx-names.dat has been deleted */
   endif
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org